Conditional Field Validation / Window Menu Bar Customization

General support questions.
Posts: 9
Joined: Wed Sep 27, 2006 1:12 pm
PostPosted: Mon Dec 11, 2006 7:51 am
I am creating a form in which I have conditional fields, that is, fields which ideally could only be entered/enabled if, say, a check box was selected. In many applications, this would appear on the interface as, say, a "grayed out" group box that you would have to enable as a group by selecting a check box or radio button or something. This doesn't seem to be possible using FileMaker. Does anyone know a slick way around this issue? Assuming that no one does, I would like to make it so that when a user finishes completing a form, a script runs to ensure that if the user entered data into the conditional fields but did not select, say, the check box that "enables" that group of fields, a dialogue displays saying something to the effect of "Hey, it looks like you want to enable this option, but you didn't, so either clear out the conditional fields or enable the option." The problem with this technique seems to be that if the user exits the form by using the X on the menu bar of the window, or the close command from the File menu, they have essentially circumvented your script and the form will not be validated. Hopefully this whole scenario makes sense (if you need clarification please do ask). Any help would be greatly appreciated.
Posts: 9
Joined: Wed Sep 27, 2006 1:12 pm
PostPosted: Mon Dec 11, 2006 9:56 am
Are there any good, reliable plugins that might help with any of this?
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Mon Dec 11, 2006 1:57 pm
Well there are bunch of options on the interface side (the greying out of options). The simplest might be two layouts with that checkbox you mentioned enabled as a button that switches between layouts when some options are selected.

When it comes to validating the users entry you can put the user into a paused script while they complete the form. If you preface your script with this:

Go to Layout (Form)
Allow User Abort (Off)
Pause / Resume Script (Indefinitely)

Then the user won't be able to close the window, etc, until they continue the script at which point you can run script to check their work. You need to make sure any buttons on the layout keep you within the paused script (ie that they don't have Exit script as a button option) and that you have a button somewhere on the layout -- like a "continue" button -- that resumes the paused script.

There are plugins that can help with this by remapping / removing the window close buttons but if you use the pause script trick you likely won't need them. SecureFM is the one we've had the best results with.
John Sindelar
SeedCode

Return to General Support

Who is online

Users browsing this forum: No registered users and 3 guests

(855) SEEDCODE
[email protected]
Follow us: