Hello,
I am currently working a website that requires 3 forms: One form would be the initial contact form which has 3 fields (name, telephone, email) and two secondary form which has the primary form fields and other fields. Now the secondary forms are not connected with another, they serve as a 'New Subscriber' and 'Already Subscribed' forms so that when someone is new they would be sent to the new subscriber and when a returning customer fills out the first form again they would be sent to the 'already subscribed' form.
The problem I am running into is when the information for the name field (first and last name) gets transferred to one of the two secondary form I lose the last name due to the space character not being recognized by the PHP string I have in place. The following is the PHP string in question - <?php echo $_GET["name"] ? > readonly="readonly"/>
Is there any way to add some php or anything else so that it does not leave out the last name portion?
Thank you for your time
Nick
I am currently working a website that requires 3 forms: One form would be the initial contact form which has 3 fields (name, telephone, email) and two secondary form which has the primary form fields and other fields. Now the secondary forms are not connected with another, they serve as a 'New Subscriber' and 'Already Subscribed' forms so that when someone is new they would be sent to the new subscriber and when a returning customer fills out the first form again they would be sent to the 'already subscribed' form.
The problem I am running into is when the information for the name field (first and last name) gets transferred to one of the two secondary form I lose the last name due to the space character not being recognized by the PHP string I have in place. The following is the PHP string in question - <?php echo $_GET["name"] ? > readonly="readonly"/>
Is there any way to add some php or anything else so that it does not leave out the last name portion?
Thank you for your time
Nick
Hi Nick,
You can't pass plain spaces in a URL. Use the PHP urlencode() and urldecode() functions to handle this.
If you are using CFv4 then the 'Data to Session' and 'Session to Data' actions might be a simpler way of handling this.
Bob
You can't pass plain spaces in a URL. Use the PHP urlencode() and urldecode() functions to handle this.
If you are using CFv4 then the 'Data to Session' and 'Session to Data' actions might be a simpler way of handling this.
Bob
Thanks for the reply.
Am fairly new to Chronoforms and a novice at best at PHP. Any chance you could explain further or perhaps give me an example?
Thank you for your time
Nick
Am fairly new to Chronoforms and a novice at best at PHP. Any chance you could explain further or perhaps give me an example?
Thank you for your time
Nick
Hi Nick,
Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6.
And can you also say a little bit more about how you are transferring the data now?
Bob
Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6.
And can you also say a little bit more about how you are transferring the data now?
Bob
Hello,
Am using ChronoForms V3.2 at the moment. As far as the way am transferring the data from the first form to either of the second forms is via a Get function within the 'value' tag of the each fields. So for the name field I have the following code in each of the second forms.
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_6" name="name" type="text" value=<?php echo $_GET["name"]?> readonly="readonly"/>
The data transfers fine for the remaining 2 input fields (email, telephone) but the name loses the last name due to the 'space' character not being recognized.
Thank you for your time
Nicolas
Am using ChronoForms V3.2 at the moment. As far as the way am transferring the data from the first form to either of the second forms is via a Get function within the 'value' tag of the each fields. So for the name field I have the following code in each of the second forms.
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_6" name="name" type="text" value=<?php echo $_GET["name"]?> readonly="readonly"/>
The data transfers fine for the remaining 2 input fields (email, telephone) but the name loses the last name due to the 'space' character not being recognized.
Thank you for your time
Nicolas
Hello,
I've figured it out. I needed quotes around the value string. I guess I was looking at it too in-depth and never realized it was that simple.
Thanks again for your time
Nick
I've figured it out. I needed quotes around the value string. I guess I was looking at it too in-depth and never realized it was that simple.
Thanks again for your time
Nick
This topic is locked and no more replies can be posted.