Gossamer Forum
Home : Products : DBMan : Customization :

E-mail does not show up

Quote Reply
E-mail does not show up
Hello, I've been reading this forum for a while and are hoping that I could also get some of those wonderful people to help me.

My problem:
I'm using the secure pass lookup mod (complete). So now people sign up with a username and e-mail, and a pass will be send. When they login I would like the e-mail to show up in the add record page (retreiving it from the .pass file).
If I use the autogenerate function it does work but as soon as I turn that of nothing appears in the e-mail field.

I have this in sub build_html_record_form {
------------------------------------
my (%rec) = @_;
if ($in{'add_form'}) {
$rec{'email'} = &get_email ;
}
------------------------------
And the following in sub html_record_form {
--------------------

<TR><TD ALIGN="Right" VALIGN="TOP" width="30%"><$font_color>email:</FONT></TD>
<TD VALIGN="TOP" width="70%"> <INPUT TYPE="text" NAME="email" SIZE="20" VALUE="$rec{'email'}" MAXLENGTH="255"></TD></TR>
------------------------------
Any suggestions are very welcome

Ronmon
Quote Reply
Re: E-mail does not show up In reply to
This has been discussed before...

Wink

Change the following codes:

Code:
<INPUT TYPE="text" NAME="email" SIZE="20" VALUE="$rec{'email'}" MAXLENGTH="255">

to a hidden field:

Code:
<INPUT TYPE="hidden" NAME="email" VALUE="$rec{'email'}">$rec{'email'}

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: E-mail does not show up In reply to
Thanks for the help

I tried your suggestion before and it didn't work. But just to be sure I copied and pasted it into my html.pl

The field is still completely empty. It just looks like it doesn't read the e-mail from the .pass file. But when autogenerate enabled it does work. This is confusing me.

Quote Reply
Re: E-mail does not show up In reply to
Well...the other problem could be is that you are using the wrong case setting for the email field.

Is your "email field" titled email -OR- Email???

If it is the latter, then you need to change the following codes:

Code:
$rec{'email'} = &get_email;

to the following codes:

Code:
$rec{'Email'} = &get_email;

Then change the codes I gave you before to the following:

Code:
INPUT TYPE="hidden" NAME="Email" VALUE="$rec{'Email'}">$rec{'Email'}

Regards,


------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: E-mail does not show up In reply to
It's all lowercase (so email) as far as I can see. Maybe it's something really simple that I'm just overlooking :-(

Here are the locations of the .txt files if that might be usefull.

http://www.bc.edu/bc_org/svp/st_org/gisa/default_cnf.txt
http://www.bc.edu/bc_org/svp/st_org/gisa/default_cfg.txt
http://www.bc.edu/bc_org/svp/st_org/gisa/db_cgi.txt

Sorry for taking so much of your time. I really appreciate this.

Ronmon
Quote Reply
Re: E-mail does not show up In reply to
And what about your html.pl file??

Wink

Okay...I looked at the files you provided...

I do not know why you have single quotes around single word field names. You only need these if you have more than one word field names.

Other than that...I could not see anything that stands out...But the problem could be in your html.pl file.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: E-mail does not show up In reply to
Sorry, something went wrong with copy and paste of the urls. Here it is.

http://www.bc.edu/bc_org/svp/st_org/gisa/html_pl.txt


And those single quotes probably come from the JPDeni configurator (never changed those field names)
Quote Reply
Re: E-mail does not show up In reply to
I don't even see the following codes in your html.pl file:

Code:
if ($in{'add_form'}) {
$rec{'email'} = &get_email ;
}

These codes need to go at the top of the sub html_record_form AFTER the following codes:

Code:
($db_auto_generate and print &build_html_record_form(%rec) and return);

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: E-mail does not show up In reply to
I had that code in my db.cgi under sub build_html_record_form because I thought it would go to this subroutine whenever a record was generated.

But I put it in the html.pl as you suggested. It still doesn't work but if I comment out the "IF" function and just leave the " $rec{'email'} = &get_email " it does do what I want (at least so far).

I don't know exactly what the "IF" statement does so I don't know if it would give me problems later on if I leave it out.

Thanks for your help and patience
Quote Reply
Re: E-mail does not show up In reply to
Whether you are using autogenerate or not, the code

Code:
if ($in{'add_form'}) {
$rec{'email'} = &get_email ;
}

goes in sub html_record_form, just after

Code:
my (%rec) = @_;

That way the email address will be pulled from the .pass file whether you use autogenerate or not.

The problem that will arise if you take out

if ($in{'add_form'}) {

is that, when a user uses the form to search, his own email address will be added to the form.


------------------
JPD






Quote Reply
Re: E-mail does not show up In reply to
Sorry for being so extremely difficult.

I followed all your advise exactly but still cannot get it to work.
After signing up I and logging in I have people directly going to the add page. That's where I want the e-mail from the .pass file to show up but it doesn't.

Could somebody please have another look at the files because I really cannot come up with any other ideas.

http://www.bc.edu/gisa/cgi-bin/dbman/db.cgi

http://www.bc.edu/gisa/default_cfg.txt
http://www.bc.edu/gisa/db_cgi.txt

http://www.bc.edu/gisa/html_pl.txt

Thank you so much
Ronald
Quote Reply
Re: E-mail does not show up In reply to
Thank you so much. This did indeed fix my problem.

That other line was probably still a residue from something I was trying out.

Ronald
Quote Reply
Re: E-mail does not show up In reply to
I see a line

Code:
my ($message, $user_list, $password, $permissions, $email) = @_;

Where did you get that code?

I know the problem. There are so many mods that they sometimes have a little problem working together.

In sub html_home, you have:

Code:
if ($per_add) {
%rec = &get_record($db_userid);
unless ($rec{$db_key}) {
&html_add_form;
return;
}
}

Add the following:

Code:
if ($per_add) {
%rec = &get_record($db_userid);
unless ($rec{$db_key}) {
$in{'add_form'} = 1;
&html_add_form;
return;
}
}

That should fix it.


------------------
JPD