The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Get a Value from an Entry in Same Form

Labels

This Discussion is public

Notifications

I have been trying to auto populate a field in my form, from a value that was entered by the user in the same field type, of the same form.

Using entry such as: [frm-field-value field_id=123 user_id=current]

However, no matter what I do, the second field never populates with the the entry from the other field (ID 123 as noted above).

Does anyone have any ideas?

 

 

Your question does not provide enough details to answer your question definitively. In general, shortcodes are PHP snippets executed on the server. To derive a value from server executed code, the form entry has to have been saved already.

If you trying to populate a second field while the user is still entering the content on the front end, you have to use jQuery.

When are you trying to populate the field and why? Where do you want it to display? Is it a hidden field?

Please provide insight into the process you want to accomplish.

Oh... got it.  Thanks vfontjr

This would be to populate fields in a form, with previous entries made in fields of the same form, prior to submitting the form.

Here's the specifics:

My form initially asks the user for their "business phone number and address."

Then further down in the form its asks if they are currently employed.

If they answer yes to being currently employed, then it asks them for their "current employer phone number and address."

I wanted to make it so that they could toggle a switch "on" to autopopulate "current employer phone number and address" with the information they had previously input under "business phone number and address," if the information is the same.

Basically, so they wouldn't have to enter it again if it's the same.

Thank you,

Jerry

Look at this example: https://victorfont.com/formidable-pro-tabbed-form-sample/#squelch-taas-tab-content-1-0

Enter a permanent address and then click the temporary address tab. Click the checkbox. Is this what you're trying to achieve?

Hi vfontjr - PERFECTO....

That is it..

Thank you.

Attached is the jQuery from that sample form for the address fields. You'll have to edit it to reflect your fields and trigger.

Once you've edited it, copy the entire js file into the after fields section on the cutomize HTML page of the form's settings.


Attachment:
bind-unbind-address.js_.zip

Discussion closed.