Gossamer Forum
Home : Products : Links 2.0 : Customization :

skipping contact name & contact email for adding link?

Quote Reply
skipping contact name & contact email for adding link?
I would like to add a new link without filling contact name and contact email, without the error message below.
Modifiying links.cfg for links 1.1.1 worked OK but the new version 2.0 seems different.
Could you help?

---
Links Database: Error: Unable to Add Link
Error: Unable to Add Link
There were problems with the following fields:

* Contact Name (Can not be left blank)
* Contact Email (Can not be left blank)

Please fix any errors and submit the record again.
Quote Reply
Re: skipping contact name & contact email for adding link? In reply to
Or you can do what I did. It adds the name and email address, but it does it automatically since I specified it in the %db_def record as the default. It has no effect on the add.cgi form.

Here are the two lines from %deb_def in links.def:

Quote:
'Contact Name' => [6, 'alpha', 40, 75, 1, 'Links Manager', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, 'linksmanager@orphanage.com', '.+@.+\..+'],
Quote Reply
Re: skipping contact name & contact email for adding link? In reply to
I think if you look at your add.html file in your template section you can just enter hidden fields for this and when ever someone enters a link it will give them a default contact name and email address.
If your talking about in the admin section, then you just need to alter links.def I believe and include the default variables that you want to use. I would also suppose that if your not using templates, then you merely need to edit your site_html.pl file in the add form area.
Good Luck