Forums

This topic is locked

Hide/Unhide or Lock/unlock a form object

Posted 13 Nov 2001 18:10:23
1
has voted
13 Nov 2001 18:10:23 Gary Bennion posted:
Hi,
This problem is regards a data entry form.
Does anyone know how to lock or unlock, hide or unhide a text field depending on what a user selects from a dropdown menu.
I am willing to try code is that the only way it can be done !

Replies

Replied 15 Nov 2001 01:43:16
15 Nov 2001 01:43:16 Ryan Schwiebert replied:
This may NOT be the best way to do this. But it is working for me. (No hand Coding)

I created a page with two forms on it. The top form has just the drop down list in it, the bottom one has the secondary form field and a hidden field set to the first form's value. (This is done in case you need to pas both variables, and can be dropped if this is not necessary.

The top form's action should be the same page you are working on, the bottom form's page should be the one you want to go to when the data is all collected.

Next create a recordset with the filter set to the form variable of the first form's dropdown list.

Now, select the SECOND form and choose "hide if record set is empty". This will hide that form until the data from the top form is submitted.

On the FIRST form, you can use javascript to automatically submit the form on select, but I would also include a submit button for older browsers.

Once that form is submitted, the next form will also display, and the data there can be made dynamic according to the top form (with dynamic form elements).

Does that make sense? If not I can post the code for you to look at. Let me know.

--
Ryan
Replied 15 Nov 2001 10:13:50
15 Nov 2001 10:13:50 Gary Bennion replied:
Cheers Ryans, thats pointed me in the right direction I think I know how to do it now!!
Thanks

Reply to this topic