Gossamer Forum
Home : Products : DBMan : Installation :

Clickable Links

Quote Reply
Clickable Links
I am using my own custom forms and been trying to put in the clickable links command from some of the other threads here. I seem to be doing something wrong. How should this be set up? <TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>URL (If Any): </FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="URL" VALUE="<a href="URL:$rec{'URL'}">$rec{'URL'}></a>" <SIZE="40" MAXLENGTH="255"></TD></TR>

Also I am trying to make some hidden fields only available to the administrator. I found this thread but it is still not working. Again what am I setting up wrong. <TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Validated:</FONT></TD>
<TD VALIGN="TOP"><INPUT TYPE="HIDDEN" NAME="VALIDATED" VALUE="NO"> |; print &build_radio_field ("Validated", "$rec{'Validated'}"); print qq|</TD></TR>
</TABLE>
Thanks
Venice
Quote Reply
Re: Clickable Links In reply to
Okay have added the script. I tried to test it out and I am getting an error, I think due to something else I have done wrong.

Error: Unable to Add Record
There were problems with the following fields:
First_Name (Can not be left blank)
Parent_Email (Can not be left blank)
Please fix any errors and submit the record again.

This is the error I am getting also when I try to make the URL box longer it will not change. Could you take a look at my code?

http://www.courtyard.net/KidZone/html.txt
http://www.courtyard.net/KidZone/penpals.txt

Thanks
Venice
Quote Reply
Re: Clickable Links In reply to
The NAME= part of your form fields much match exactly the name of the field in your .cfg file.

So

NAME="First Name"

needs to be

NAME="First_Name"

NAME="Parents Email"

needs to be

NAME="Parent_Email"

The rest of it looks fine, although I didn't look real close. Smile


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





Quote Reply
Re: Clickable Links In reply to
You can't make clickable links within form input fields. Clickable links are only for html_record, not html_record form.

Your URL entry field needs to be:
Code:
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>URL (If Any):
</FONT></TD>
<TD VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="URL" VALUE="$rec{'URL'}" SIZE="40" MAXLENGTH="255"></TD></TR>

For your admin-only field use

Code:
|;
if ($per_admin) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP">
<$font_color>Validated:</FONT></TD>
<TD VALIGN="TOP">|;
print &build_radio_field ("Validated", "$rec{'Validated'}"); print qq|</TD></TR>
|;
}
else {
print qq|
<INPUT TYPE="HIDDEN" NAME="Validated" VALUE="$rec{'Validated'}">
|;
}
print qq|

You also need to set the default value for the Validated field to 'No' in your .cfg file.


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







[This message has been edited by JPDeni (edited July 08, 1999).]
Quote Reply
Re: Clickable Links In reply to
Okay I set the mailto link in the html.pl form under the catagory of sub html_record like this: <TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Email: </FONT></TD>
<TD> <$font><A HREF="mailto:$rec{'Email'}">$rec{'Email'}</A></Font></TD></TR>

What is the code to make the URL a link?

I am wondering something though maybe this will help me with future questions.

1) The sub html_record_form is for your custom html and it is displayed only when adding new entries or to the administrator and when someone wants to do a search right?

2) The sub html_record in html.pl is what is displayed when a search is done. I can delete items from this one if I don't want the information displayed on a search, correct?

On the code you gave me for the validated item which file is that under, html.pl or default.cfg? I looked and could not see it. Guess I am going blind.

Thanks
Venice
Quote Reply
Re: Clickable Links In reply to
sub html_record_form creates the forms that are used for searching, adding, and modifying. They include form input fields, such as text fields, radio buttons, checkboxes, select lists, textareas and hidden fields. You do not want to try to put anything clickable in them. They are just form inputs.

sub html_record creates the way a record is displayed after searching. This is where you would put your clickable links. You do not want to put any form input fields in here at all. The basic format you will want to use is

Code:
<tr><td>Field Name Label:</td>
<td>$rec{'FieldName'}</td></tr>

Yes, you can delete any fields you don't want to be displayed. Or, putting it another way, you can include only those things that you want to be displayed.

Your email link in sub html_record is exactly correct.

To make a URL link, use

Code:
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>URL: </FONT></TD>
<TD> <$font><A HREF="$rec{'URL'}">$rec{'URL'}</A></Font></TD></TR>

The code I gave you for the Validated field goes into the html.pl script, sub html_record_form, wherever you want to place the radio buttons for the Validated field.

Note that you will have to start the code with a |; in order to close off a previous print qq| statement. (That's in the code I gave you.) What I forgot to add was another print qq| to start printing the rest of the form. If I don't forget in the next three minutes, I'll change it in the previous message.


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





Quote Reply
Re: Clickable Links In reply to
Wow thanks. I sure learned a lot today thanks to you. I fixed all the problems and even figured out why my form would not go longer in one of the text fields. Left in a < form a previous edit. I need a break but will be at it again tonight and I am know I will be back. LOL

Thanks again.

Venice