Hi there! I hope someone can help me with this little problem I’ve got.. It seems so easy..
I’ve got a Flash form in which users can fill in their name and press a button. They are then redirected to another page, and the name they filled in is sent through POST and made into a placeholder (this works, I can see the name on the page with the placeholder). Here comes the problem: On this page there is another form (eForm). My idea is to put the name the user already filled in in the Flash form as a hidden input value in the eForm on this page (so I can use it later on). Besides this hidden name field the user also has to fill out some more formfields on this page and then the whole thing gets emailed through eForm. The only thing I cannot get working is to show the filled in name as a value in eForm.
These are the pages, snippets and chunks I’ve got:
page with FLASHFORM:
With Flash/php the following var is set:
$flash_name > sent with POST
snippet [[flash_vars]]:
$flash_name = $_POST['flash_name'];
$modx->setPlaceholder('flash_name', $flash_name);
chunk {{eForm_flash}}:
<input type="hidden" name="flash_name" id="flash_name" value="[+flash_name+]" /><!-- value is blank :( -->
Document "Contact us":
[!flash_vars!]
[+flash_name+] <!-- Just a test, but this works!! -->
[!eForm? &formid=`eForm_flash` &to=`[email protected]` &tpl=`eForm-flash-form` &report=`eForm-flash-email`
&thankyou=`eForm-flash-thanks` &mailselector=`department` &vericode=`0` &subject=`Contact form`!]
I also tried to write the hidden fields as output in the flash_vars snippet and include the snippet in the eForm_flash chunk as part of the form. This works the first time, but when there’s an error in the form and the page refreshes the data is lost.
I must be doing some simple thing wrong...
Any help would be much appreciated!