Greetings all,
I'm trying to better understand what goes into building Joomla-based websites and so I've taken up a challenge our designer created. We have a custom module in the sidebar of every page with a "sign up" box for the client's newsletter subscription. They want the person to be able to enter their email address and submit to sign up.
However, they would also like to be able to get a little more information about the person subscribing (this is a B2B site) so once the email address is submitted, they want to load a new page with a submission form that asks for additional information, such as name, title, company name.
I can think of a couple of ways to do this in theory. I could create a record that is just an email address, and then open that record with the additional fields when the new page loads. This seems like the easiest way, but I'm not sure how to do that.
I could use Javascript to create a cookie that saves the email address and then repopulates the field when the new form opens. This seems like it's a lot more work and probably over-thinking the situation.
Or, I could humble myself before the experts and ask you how to perform this elusive task. There is probably an easy way--well, easy for you--that I'm not yet aware of.
Thank you for any suggestions you can make.
Tim
I'm trying to better understand what goes into building Joomla-based websites and so I've taken up a challenge our designer created. We have a custom module in the sidebar of every page with a "sign up" box for the client's newsletter subscription. They want the person to be able to enter their email address and submit to sign up.
However, they would also like to be able to get a little more information about the person subscribing (this is a B2B site) so once the email address is submitted, they want to load a new page with a submission form that asks for additional information, such as name, title, company name.
I can think of a couple of ways to do this in theory. I could create a record that is just an email address, and then open that record with the additional fields when the new page loads. This seems like the easiest way, but I'm not sure how to do that.
I could use Javascript to create a cookie that saves the email address and then repopulates the field when the new form opens. This seems like it's a lot more work and probably over-thinking the situation.
Or, I could humble myself before the experts and ask you how to perform this elusive task. There is probably an easy way--well, easy for you--that I'm not yet aware of.
Thank you for any suggestions you can make.
Tim
Hi Tim,
There are a couple of ways of doing this, here's the general purpose one.
Use two forms, one is the newsletter sign-up; the second the extra info request.
Create a single database table for all of the info and make DB Connections from both tables to it.
After the data is saved to the database get the cf_id of the record. Use a custom Redirect URL to go to the second form that includes the cf_id as &cf_id=xxxx.
In the second form get the cf_id from the URL. If there isn't one then redirect somewhere else . If there is put it into a hidden input in the form. (You could also check for a valid cf_id here.)
That's it really.
Bob
PS Note that this will also work if the user goes off-site e.g. to PayPal or to a 3rd party newsletter sign-up provided that there is a re-direct url.
There are a couple of ways of doing this, here's the general purpose one.
Use two forms, one is the newsletter sign-up; the second the extra info request.
Create a single database table for all of the info and make DB Connections from both tables to it.
After the data is saved to the database get the cf_id of the record. Use a custom Redirect URL to go to the second form that includes the cf_id as &cf_id=xxxx.
In the second form get the cf_id from the URL. If there isn't one then redirect somewhere else . If there is put it into a hidden input in the form. (You could also check for a valid cf_id here.)
That's it really.
Bob
PS Note that this will also work if the user goes off-site e.g. to PayPal or to a 3rd party newsletter sign-up provided that there is a re-direct url.
This topic is locked and no more replies can be posted.
