HOW TO: Pre-fill Order Forms on a secure Landing Page using Smart Form CGI variables
Live example: http://yoursubdomain.ontraport.com/f/1/21729/58/8cec2e249b3b6759234a557b3df7569c
-----------------------
-----INSTRUCTIONS------
-----------------------
1. Create Smart Form set to pass CGI variables, with secure TY page
2. A. Create Order Form to place on secure TY page > B. generate HTML > C. place Order Form on Landing Page using an HTML Layer
3. Next, obtain the input ID's for First Name, Last Name and Email fields using the Order Form HTML
These are what you're searching for: (Screenshot: http://screencast.com/t/sz1wfSmfy)
A.
B.
C.
The IDs are therefore: (Keep in mind, these will be unique to YOUR Order Form or Smart Form)
A. First Name = mr-field-element-926429679554
B. Last Name = mr-field-element-989567682334
C. Email = mr-field-element-383940685874
4. In the script below, replace YOUR-FIELD-ID-HERE with the corresponding ID you found above
EXAMPLE for First Name field:
FROM: document.getElementById('YOUR-FIELD-ID-HERE').value = getParameterByName("firstname", url);
TO: document.getElementById('mr-field-element-926429679554').value = getParameterByName("firstname", url);
NOTE: These IDs are unique to YOUR Form. This won't work for you using my IDs. :)
5. Once you've filled in all IDs in the script, copy/paste the script immediately after the Order Form HTML in the SAME HTML Layer. I've found this is finicky if you place the Order Form HTML and script in separate layers. (I assume it depends on which loads first. Placing in the same layer avoids this issue.)
-----------------------
-----SCRIPT BELOW------
-----------------------