Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Customizing join.cgi question

Quote Reply
Customizing join.cgi question
Hi guys, I found some great tips here on customizing the join form, special thanks to wickedmoon for posting up his... I have a couple more questions I was wondering if someone could point me in the right direction

1) I want to include a checkbox like "contact me with special offers" and I'm trying to figure out how to have it default to checked when they first hit the page to signup and also get parsed properly as they fill in the data (ie, if there are errors, to keep track of what it was)... kind of like on yahoo's signup.

2) I want to include some co-registration stuff in there and have like a dozen check boxes they can choose from. Would I just create one field for this and will GM take care of handling the insert for all the possible combinations of boxes checked or am I going to have to customize how it gets inserted into the database? If I have to customize it, any pointers towards things I'll have to change would be greatly appreciated.

3) If I want to make a field requried, is it as simple as making the field not null and resync through the admin or do I need to do something else?

4) If I am adding additional information to the signup like, like half a dozen demographic questions, I know I need to go into the admin and create the columns then resync, but does that take care of the inserts when people sign up or do I have to modify the insert statements somewhere?

5) I'm using multiple domains and I saw the post here
about automatically selecting the domain, I would like to do this, but I'm a little confused. Where is the global that I put the sub template it and do I change the $checked to what it shows in that post in sub template or am I changing that somewhere else (ie a template or templates) and can I do the same thing for the domain as well as the template? Also, when I change this is there some special way to name the template directories to match up to the server name (ie www.domain.com) or am I completely clueless here :)

Thanks for any assistance.

Quote Reply
Re: Customizing join.cgi question In reply to

1. You would need to do something like:

<input type=checkbox name="contact_me"<%if contact_me%> checked<%endif%>>

and then try and pass in contact_me=1 to the page that displays the form.

2. You could do it as one field, should work fine (make sure you use 2.0.4, as we fixed a few things in handling of multi-selects and multi-checkboxes.

3. You don't need to resync, just make the field not null through the admin (not mysqlman, just go to Database->Demographics).

4. You can set this up in Database->Demographics.

5. Actually, that was for automatically selecting the template set, not the domain. To select the domain you can go to login.cgi?domain=foo.com and it will be preselected. Or you can add a global:

current_domain => sub { return $ENV{SERVER_NAME} };

and then use <%current_domain%> in the form.

Hope this helps,


Gossamer Threads Inc.