Hi,
I am passing a field to a second form. My url after submitted looks like this:
http://www.domainname.com/quote.html?zipcode=090210
How do I get that 'zipcode' data to populate the zipcode field on my second form?
Been rackin my head on this all day -- just want a simple way of doing this. 🙄
Tx
I am passing a field to a second form. My url after submitted looks like this:
http://www.domainname.com/quote.html?zipcode=090210
How do I get that 'zipcode' data to populate the zipcode field on my second form?
Been rackin my head on this all day -- just want a simple way of doing this. 🙄
Tx
Hi falcos,
Try
Bob
Try
<?php
$zipcode = JRequest::getString('zipcode', '', 'get');
?>
Bob
Am I putting that in the FORM HTML code on the second page?
How do I show it in the zipcode field?
How do I show it in the zipcode field?
value=?????
Bob,
Actually I have it working with a test.html document that has the following code in it, my issue is how/where do I put this info into chrono??? Does chrono change the form names on it's own?
Actually I have it working with a test.html document that has the following code in it, my issue is how/where do I put this info into chrono??? Does chrono change the form names on it's own?
<FORM NAME="formname">
<INPUT TYPE="text" NAME="zipcode">
<INPUT TYPE="submit">
</FORM>
<SCRIPT LANGUAGE="JavaScript"><!--
function getParm(string,parm) {
// returns value of parm from string
var startPos = string.indexOf(parm + "=");
if (startPos > -1) {
startPos = startPos + parm.length + 1;
var endPos = string.indexOf("&",startPos);
if (endPos == -1)
endPos = string.length;
return unescape(string.substring(startPos,endPos));
}
return '';
}
var passed = location.search.substring(1);
document.formname.zipcode.value = getParm(passed,'zipcode');
//--></SCRIPT>
Hi falcos,
Using JavaScript is a very complicated way of doing it.
You add it to the input value as you suggested.
Bob
Or you can use the ChronoForms multi-page plugin which will handle most of it for you.
Using JavaScript is a very complicated way of doing it.
You add it to the input value as you suggested.
<input . . . value='<?php echo $zipcode; ?>' />
Bob
Or you can use the ChronoForms multi-page plugin which will handle most of it for you.
This topic is locked and no more replies can be posted.