Jump to content

Custom Field Validation if more that x Char


This topic is 2305 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello, 

i have a custom dialog, i need to put 4 character and then click ok

could i make the custom dialog box validate automatically if i put 4 characters ? 

Thanks you

 

Screen Shot 2016-03-07 at 10.48.55.png

Link to comment
Share on other sites

if you need to validate data before processing i would not use a custom dialog.

I would use a popover and build my own custom dialog because with the popover button you have greater ability to customize the user experience.

Edited by Kris M
Link to comment
Share on other sites

Hi Kris M, thanks you for the answer, 

i try right now with the popover but i can't use a script with it ?

right now with dialog box it s working like this  i click to a "button x" > script load captcha picture from webviewer >show it bigger> open dialog box> I put the character > I click ok >script put it in the field captcha of webviewer> script simulate click on "validate" of the webviewer > done

what i would like is that the click on OK of dialog  box will be done automatically if i put 4 characters. 

you think it could work with popover ?

thanks you

Link to comment
Share on other sites

3 hours ago, ibobo said:

could i make the custom dialog box validate automatically if i put 4 characters ? 

Yes, of course you can. There are several ways you could set this up, depending on what you want to happen in each case. Here's a simple example:

...
If [ Get ( LastMessageChoice ) = 1]
  If [ Length ( YourTable::UserInput ) = 4 ]
    # PROCEED
  Else
    # ERROR
  End If
End If
...

 

Link to comment
Share on other sites

5 hours ago, comment said:

Yes, of course you can. There are several ways you could set this up, depending on what you want to happen in each case. Here's a simple example:

...
If [ Get ( LastMessageChoice ) = 1]
  If [ Length ( YourTable::UserInput ) = 4 ]
    # PROCEED
  Else
    # ERROR
  End If
End If
...

 

Thanks you Comment, 

it works ;) but i still need to click on "OK" button, what i would like is that it doing it, it self since i put 4 character, to avoid the click with the mouse. 

This example have nothing to do with filemaker but just for understand :  on google.com  you dont need to click on "research" button, it doing it self since i writing something in safari or firefox. 

:) 

Link to comment
Share on other sites

9 minutes ago, ibobo said:

i still need to click on "OK" button, what i would like is that it doing it, it self since i put 4 character, to avoid the click with the mouse.

You cannot do that with custom dialog. Once you have invoked a custom dialog, it will stay up until you click one of the buttons (or press the equivalent key).

You can do that by having the user type directly into a field, and using a script triggered OnObjectKeystroke.

Link to comment
Share on other sites

This topic is 2305 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.