Request a Call
Online Chat
 

Parsing data to prepopulate forms embedded on your web site

Posted by Dave Zulu, Last modified by Dave Zulu on 13 August 2016 07:41 PM

This support item is for web developers and coders that have an understanding of HTTP REFERER etc

Useful link: http://www.w3schools.com/php/filter_validate_url.asp 

 

Q: How would we prepopulate data using our web forms and your other applications?

Example: Prepopulate Form Fields by adding variables to the URL, in this case the form URL:

A standard form URL looks like this: https://youraccount.au.zuluedm.com/pdform.php?fid=24

Where fid=24 is the form ID from your account. Follow these simple steps as you will need to embedd the Form Code in your site:

  1. Paste the form URL into your browser and hit submit
  2. View the source of the form page and use all of the form source code to paste into your Web Site HTML
  3. Check the Form Source to ensure you have all of the information recommended (you will find this in the 'Edit Form' section of your account).

Once you have pasted the code ensure all links are absolute i.e.:

<form name="subscription_form" id="subscription_form" method="post" enctype="multipart/form-data"
action="https://youraccount.au.zuluedm.com/pdform.php?fid=24"

Next to prepopulate the fields:

The Form URL will handle additional variables without causing issues. So you can do this:

https://youraccount.au.zuluedm.com/pdform.php?fid=24&name=Phil&email=acc@123.com

Then using serverside or JavaScript simply access the URL variables and prepopulate them into the form data:

ie.  (of course you need to set the variable etc using normal scripting)

<input type="text" class="text" name="0_people_fname" value="<?php echo $VarName; ?>" id="id_0_people_fname"/>

 

(0 vote(s))
Helpful
Not helpful

Comments (0)

Copyright Zulu Labs Global Pty Ltd, 297 Dorcas Street South Melbourne VIC, Australia 3205. Ph +61 3 9001 1590