Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Changing Form Values

Quote Reply
Changing Form Values
I am trying to change the Add form values to something that fits my site a little bit more. I am trying to change the default:

Title: $in{'Title'}
URL: $in{'URL'}
Category: $in{'Category'}
Description: $in{'Description'}
Contact Name: $in{'Contact Name'}
Contact Email: $in{'Contact Email'}

fields to this:

Name: $in{'Title'}
Category: $in{'Category'}
State/Country: $in{'Description'}
Email Address: $in{'Contact Email'}

I've changed everything on the add.html template, and the add.cgi file. When I try to submit the form, I'm getting the following error...

Unknown Tag: URL

What other files do I need to change the form variables in to accept the new fields??
Quote Reply
Re: Changing Form Values In reply to
You need to one of the following:

1) If you want to have a URL field, but not have people fill it out, then you need to use a hidden field, like the following:

Code:
<input type="hidden" name="URL" value="$rec{'URL'}">

2) If you do not want the URL field, then you need to delete the URL field in the %db_def hash in the links.def file. Then you also have to re-number your fields in this hash, and the IMPORTANT FIELDS in the same 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: Changing Form Values In reply to
Thanks Eliot,

Got that part figured out. Is there a way to have the form submit what they enter in the "Contact Email" field as the URL using the 'hidden' command?

I've put...

<input type="hidden" name="URL" value="mailto:">

in the form so all I have to do is cut and paste the "Contact Email" field from the validate part of the admin script, but is there a way to get that to automatically happen behind the scenes?

Know what I mean?
Quote Reply
Re: Changing Form Values In reply to
Well, you will have redundant values...two email fields.

You would need to use the following hidden field:

Code:
<input type="hidden" name="URL" value="<%Contact Email%>">

However, if you are not going to be using the URL field, then I would delete it completely from your links.def file and re-number the field numbers and also re-number the IMPORTANT FIELDS as I suggested before!

Wink

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: Changing Form Values In reply to
Cool, thanks again Eliot. You rock dude. The value="<%Contact Email%>" part didn't want to work right but I'm on the right track and will figure it out. I'm a pretty fart smeller... errrrr, smart feller.... like that (completely self-taught by the way).

:-)

You can check out

http://www.clusterheads.com/states/pages/

to see what I'm trying to do if you want. Better do it fast cause stuff's changing by the minute...

Thanks again dude!
DJ