I have a dropdown box populated through a db query. I want the selection from this dropdown to populate a form based on a db read. Reading through the forums, etc. it seems like this solution is evident to almost everyone except myself.
I have been through the forums, tutorials etc and still don't quite understand how to do this and need to get the project off my desk . I can easily post webpages up and provide access.
Any help out here?
I have been through the forums, tutorials etc and still don't quite understand how to do this and need to get the project off my desk . I can easily post webpages up and provide access.
Any help out here?
Hi drgolden,
You want 1 dropdown to populate multiple fields from the database, correct ?
Best regards,
Max
You want 1 dropdown to populate multiple fields from the database, correct ?
Best regards,
Max
Yep. The dropdown lists the names of the forms submitters. I want to create the for a reviewer to select the name, have to form populate and allow a review of the entire form.
I have the dropdown working, it's just getting the down select to populate the form fields.
I have the dropdown working, it's just getting the down select to populate the form fields.
Hi drgolden,
I would do this with a two page form - have the drop-down on the first page with a Next button, then have the main form on the second page and use a DB Read action together with the name from the first page to load the selected record.
Bob
I would do this with a two page form - have the drop-down on the first page with a Next button, then have the main form on the second page and use a DB Read action together with the name from the first page to load the selected record.
Bob
Hi Bob-
I know this is extremely simple, but formulating the DB Read action is where I get hung up.
On page 1 the dropdown (dropdown2) contains the value of ecname field.
I am assuming that I need to get the selected value of (dropdown2) and input it into the condition statement of DB Read:
<?php return array('ecname' => '[dropdown2]'); ?> .
I can't find how to specifiy the selected dropdown value in the conditions statement.
I know this is extremely simple, but formulating the DB Read action is where I get hung up.
On page 1 the dropdown (dropdown2) contains the value of ecname field.
I am assuming that I need to get the selected value of (dropdown2) and input it into the condition statement of DB Read:
<?php return array('ecname' => '[dropdown2]'); ?> .
I can't find how to specifiy the selected dropdown value in the conditions statement.
Hi drgolden,
Please try
Bob
Please try
<?php
return array( 'ecname' => $form->data['dropdown2'] ) ;
?>
Bob
Hi Bob-
So when I go to the second page, the debugger shows the proper data array. The debugger shows the correct data for the query and the field ecname in debugger array is correct.
However, the text box on that page with field id and field name set to ecname does not populate.
Perhaps the setup sequence for page 2 is incorrect/incomplete ?
(after on submit)
On Page 2
Multipage
DB Read
HTML Render Form
Debugger
Just bought you a cuppa. Hope that helps a bit.
So when I go to the second page, the debugger shows the proper data array. The debugger shows the correct data for the query and the field ecname in debugger array is correct.
However, the text box on that page with field id and field name set to ecname does not populate.
Perhaps the setup sequence for page 2 is incorrect/incomplete ?
(after on submit)
On Page 2
Multipage
DB Read
HTML Render Form
Debugger
Just bought you a cuppa. Hope that helps a bit.
This topic is locked and no more replies can be posted.