Hi sandrews,
Sorry for not getting back to you sooner on this!
Interesting case. Yes, the Form Builder could certainly help: but it may take a little custom work to get it set up the way you want. The first page (the one containing the dropdown with the onchange), I would still leave outside of the Form Builder + have it just link to the Form Builder form with the appropriate GET variable.
In the form builder page itself (i.e. the "Form Page" template of the template set you're using), you'll need to extract that variable and use it to populate your fields. Perhaps the simplest way to do this is with jQuery. For example:
What that code does is: if the query string contains "company_name=Company1", it outputs some JS to the page which runs on page load. That code populates the field with ID field1 with a value of "Your value".
That's the general idea: depending on how your form is arranged, it would need some tweaking though.
- Ben
Sorry for not getting back to you sooner on this!
Interesting case. Yes, the Form Builder could certainly help: but it may take a little custom work to get it set up the way you want. The first page (the one containing the dropdown with the onchange), I would still leave outside of the Form Builder + have it just link to the Form Builder form with the appropriate GET variable.
In the form builder page itself (i.e. the "Form Page" template of the template set you're using), you'll need to extract that variable and use it to populate your fields. Perhaps the simplest way to do this is with jQuery. For example:
Code:
{{if $smarty.get.company_name == "Company1"}}
<script>
$(function() {
$("#field1").val("Your value");
});
</script>
{{/if}}
What that code does is: if the query string contains "company_name=Company1", it outputs some JS to the page which runs on page load. That code populates the field with ID field1 with a value of "Your value".
That's the general idea: depending on how your form is arranged, it would need some tweaking though.
- Ben