<p>I don't know if we can compare the problem I usually have but here is my way.</p>

<p>Whenever I build a website where users can login and save "entries" they also need to stay connected to it off course.
I make sure the title of the new made entry got the users ID in it. So if someone makes a new entry they go to a succes page after the form is submitted. This success page is actually the entry they created. The moment they land on that page the "second" form will be automatically filled in with the details I need and then save/update whatever needs to be updated (most of the times for me that would be saving the entry to a user profile). After the second form submit's I redirect them to the page I want.</p>

<p>This would include some javascript.</p>

CC BY-SA 3.0
2017-07-19T14:14:04.367Z
Thanks for your suggestion Justin.  There are multiple additional forms that the user could choose from if they needed to submit another form so I don't think in my situation I could embed another form. The two fields I'm wanting to pass are included on every other form though.
Lori
CC BY-SA 3.0
2017-07-19T07:12:17.957Z
2017-07-19T07:12:17.957Z
Justin Dekkers
<p>Is there a straightforward way of saving the input of two form fields when a form is submitted from the front end and reusing it in another form?</p>

<p>One field is a select2 field (Users) which can contain multiple users and the other is a number field (Log ID).</p>

<p>The current workflow is that a user fills out a form and it's submitted to the database.  It's very likely that he will need to fill out additional forms immediately afterwards and two of the fields he inputed (Users and Log ID Number) in the first form are the same in the second form.</p>

<p>The workflow that came to mind was whether after first form submission, I could append the Users and Log ID into the url query string and then have them available to prepopulate in the additional forms.  Perhaps on a successful form submission page, I could have a button to allow the user to submit another form and if clicked, it goes to the new form page and grabs the url query string values and enters the info in the two fields.</p>

<p>Totally open to other ways of seeing this too so feel free to throw your thoughts out there.</p>

<p>Thanks!
Lori</p>

<form>
Save field inputs upon submission of front end form for reuse in new form?
# Save field inputs upon submission of front end form for reuse in new form?

(Asked by: username_0 on 2017-07-18)

Is there a straightforward way of saving the input of two form fields when a form is submitted from the front end and reusing it in another form?

One field is a select2 field (Users) which can contain multiple users and the other is a number field (Log ID).

The current workflow is that a user fills out a form and it's submitted to the database. It's very likely that he will need to fill out additional forms immediately afterwards and two of the fields he inputed (Users and Log ID Number) in the first form are the same in the second form.

The workflow that came to mind was whether after first form submission, I could append the Users and Log ID into the url query string and then have them available to prepopulate in the additional forms. Perhaps on a successful form submission page, I could have a button to allow the user to submit another form and if clicked, it goes to the new form page and grabs the url query string values and enters the info in the two fields.

Totally open to other ways of seeing this too so feel free to throw your thoughts out there.

Thanks!
username_0

**Tags:** form


---

## 1 answers

### Answer by username_1 on 2017-07-19. Score: 1

I don't know if we can compare the problem I usually have but here is my way.

Whenever I build a website where users can login and save "entries" they also need to stay connected to it off course.
I make sure the title of the new made entry got the users ID in it. So if someone makes a new entry they go to a succes page after the form is submitted. This success page is actually the entry they created. The moment they land on that page the "second" form will be automatically filled in with the details I need and then save/update whatever needs to be updated (most of the times for me that would be saving the entry to a user profile). After the second form submit's I redirect them to the page I want.

This would include some javascript.

> **Comments:**
> **username_0**: Thanks for your suggestion Justin.  There are multiple additional forms that the user could choose from if they needed to submit another form so I don't think in my situation I could embed another form. The two fields I'm wanting to pass are included on every other form though.  

---

