I need to pass information from one form to another

Permalink 1 user found helpful
Hi, I have a form which only contains some data, I have another addition to this completed form with more fields. What I need is to find a way to pass data from the first form to another, so that the customer does not have to fill again.

I appreciate your help.

 
jordanlev replied on at Permalink Reply
jordanlev
Just take the data that was posted from the first form and populate fields in the second form with it. For example, if the first form is this:
<form method="post" action="form2.php">
  <input type="text" name="somedata" />
  <input type="text" name="otherdata" />
</form>

then your second form could be something like this:
<form method="post" action="somethingelse.php">
  <input type="hidden" name="somedata" value="<?php echo $_POST['somedata']; ?>" />
  <input type="hidden" name="otherdata" value="<?php echo $_POST['otherdata']; ?>" />
</form>
milsosa replied on at Permalink Reply
Thanks for answering my problem is not where you change the data because when you create a form do not have access to the code, or at least I have not found where they keep the code for editing.

I'd appreciate if you could help a lot, since it is my first project in concrete and still am not totally familiar with.

And sorry for my English (Google Translation).
jordanlev replied on at Permalink Reply
jordanlev
I think what you are asking is how to have a two-page form with the Concrete5 Form Block? You cannot do this -- if you want a two-page form, you need to code it yourself.
JohntheFish replied on at Permalink Reply
JohntheFish
There are some jQuery plugins that turn fieldsets on a form into tabs or stages in a wizard style form. Take the following with a pinch of salt because I have never used them ;-)

The idea is that you break a large form up into fieldsets. The plugin then creates a tab for each fieldset and some step1/step2/step3 stuff to make it look like a typical wizard/guide process. It will then look like a multi-tab/page form, but underneath is just 1 big form.

There is also a jQuery plugin that implements data binding, so that 2 separate parts of a form (or any DOM element) stay synchronised. Again I have never used it.