Auto populate web form field with...

User 2655226 Photo


Registered User
5 posts
Online Now

Hi,
I would just like to know if it is possible, and if yes, how, to auto populate a Web form builder form field with part of information from it's URL? I would like to auto input the customer ID, like:
http://company.coffeecup.com/webform?ID=12345
to a webform hidden field.
Thanks for any suggestion!
User 187934 Photo


Senior Advisor
20,190 posts

Here's one way.
http://www.coffeecup.com/forums/web-for … h-the-url/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2655226 Photo


Registered User
5 posts
Online Now

Hi Eric,
Thanks for your suggestion. Unfortunately the proposed logic is not reflect the one, I was trying to follow.
Probably I was not precise enough in describing my needs.
What I'm trying to do is, to initiate a link from my CRM, composed of a webform URL and ending with the ID No. of a customer. I would like to relink the webform digest back to CRM.
So, it is important that I pass a dynamic URL variable to a hidden webform field immediately after displaying, and not at the submission point.
Do you see this doable somehow?
Thanks!
User 187934 Photo


Senior Advisor
20,190 posts

I'm lost. Isn't that what I'm doing after submission. For get the fact that I'm submitting the form and populating the same form. You can use the same technique to populate the form from any link.
Here's another example.
http://ericrohloff.com/coffeecup/ccforu … etvar_url/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2655226 Photo


Registered User
5 posts
Online Now

Hi Eric,
OK, yes. It does what I need. What I still can't figure out, and please excuse my ignorance of coding, is, where exactly should I place this code:

Place this code inside your form element input code.

value="<?php echo $_GET['answer'];?>"

<input name="answer" id="item1_text_1" type="text" maxlenght="254" placeholder="" value="<?php echo $_GET['answer'];?>" />

It should be in the final webform. But, which form element input code?

Thanks for your patience!
User 187934 Photo


Senior Advisor
20,190 posts

You place this in the input you want populated. You'll need to either make sure your server allows parsing of php inside html or change your form page name to a .php extension.
value="<?php echo $_GET['answer'];?>"
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2655226 Photo


Registered User
5 posts
Online Now

Hi Eric,
I'll try make it work.
Thanks!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.