Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Creating additional fields

Quote Reply
Creating additional fields
Hi

I have read the information in the admin regarding the creation of additional fields in the admin, but I need example of how to do this to be sure.

I want to create additional fields for "Date of birth", "Occupation", "Gender" etc, using a combination of radio buttons and drop down boxes.

Could someone just give me a quick overview of how to fill out the form for creating the different types of form objects. Or point me to an area in the forums where this is explained please?

Regards

Stoosh
Quote Reply
Re: [Stoosh] Creating additional fields In reply to
Hi,

You can add fields in the Database->Demographics->Add Column feature. Once you've added your columns, you will need to update your signup and profile templates to include the new information. Just make sure to label the form field exactly like the name in the database and Gossamer Mail will handle the rest.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Creating additional fields In reply to
Hello All:
Could somebody please help with this:
I would like to add the colum, dgraph_birth_date , to my dgraph table. I created the file join_include_birth.htm and made the entries:
<select name="dgraph_day" size=1>
<option selected>Day</option>
<option value=01>01</option></select>
<select name="dgraph_month" size=1>
<option selected>Month</option>
<option value=01>January</option>
</select><input type="text" name="dgraph_year" size="4" maxlength="4">&nbsp[Ex:1980]

I included the above file in join_include.htm and everything looks good. The colums dgraph_birth_date, dgraph_gender, etc were also created in the dgrap table.
In the check_dgraph sub routine of Join.pm right before the line "foreach my $col (keys %{$c}) {" ,
I inserted the statements:

if (!$cgi->{dgraph_birth_date}) {
$cgi->{dgraph_birth_date} = ("$cgi->{dgraph_day} . '-' . $cgi->{dgraph_month} . '-' . $cgi->{dgraph_year}" || '');
$IN->param(dgraph_birth_date => $cgi->{dgraph_birth_date});
}

I finally try to add a user by way of signup but constantly get "Birth Date can not be left blank".
Could someone help.

Thank you, peter curran










In Reply To:
Hi,

You can add fields in the Database->Demographics->Add Column feature. Once you've added your columns, you will need to update your signup and profile templates to include the new information. Just make sure to label the form field exactly like the name in the database and Gossamer Mail will handle the rest.

Cheers,

Alex
Quote Reply
Re: [pyc] Creating additional fields In reply to
Hi,

It's too late to add it to $IN, the values have already been grabbed and put into $cgi. Try putting your changes right before check_dgraph is called and modify $cgi.

Hope that helps,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Creating additional fields-Solved In reply to
Hello Alex:
Thanks, it works very fine. I did put it in the subroutine add_user ; right before "my $cgi->$IN->get_hash;"
Thank you, peter curran

Last edited by:

pyc: Sep 8, 2003, 11:16 AM