Gossamer Forum
Home : Products : Links 2.0 : Customization :

Expire Listing mod

(Page 2 of 2)
> >
Quote Reply
Re: [WTrippe] Expire Listing mod In reply to
look at the top of the page and find the Support link. Click it and then on the left side of the next screen, click the Resources link...then the Links link....well you get the idea.



Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [Ian Conza] Expire Listing mod In reply to
In Reply To:
In Reply To:
Case sensitive as with all other fields.

>>ExpireDays <<

<%ExpireDays%>

Hey Paul!

Many thanks - changed that in the add form - no error message but no select field shows up either.

http://www.nzcid.org.nz/ads/add.cgi

Do not understand.. I have another select field called region and that works no worries at all.

Anyways assistance appreciated.

I'm up to this step... I tried replacing the cases as stated in the following reply but still get the message

error building select field: no select fields specified in config for field 'ExpireDays'!


IN MY SITE_HTML_TEMPLATES.PL


...
sub site_html_add_form {
# --------------------------------------------------------
# This routine determines how the add form page will look like.
#
&html_print_headers;

my $expiredays = &build_select_field ("ExpireDays","$in{'ExpireDays'}");

my $category = shift;
$category ?
($category = qq~$category <input type=hidden name="Category" value="$category">~) :
($category = &build_select_field ("Category", "$in{'Category'}"));

print &load_template ('add.html', {
ExpireDays => $expiredays,
Category => $category,
%globals
});
}
...


AND IN MY LINKS.DEF
...
Soundclip =>[17,'alpha',40,75,0,'',''],
City => [18,'alpha',40,75,0,'',''],
State => [19,'alpha',40,75,0,'',''],
Country => [20,'alpha',40,75,0,'',''],
Telephone => [21,'alpha',40,75,0,'',''],
ExpireDays => [22, 'alpha',10,10,1,'30','30|60|90|182|365']
);
...


MY ADD.HTML

...
<%ExpireDays%>
...


Did I make an error?

Thanks,

Will

Quote Reply
Re: [WTrippe] Expire Listing mod In reply to
Code:
ExpireDays => [16, 'numer', 3, 3, 1, '', ''],

In links.def

Further down in links.def you will find this:

Quote:
# Hash of column names to possible options. If you want to use a select form
# field, you can use &build_select_field in your HTML page. This routine will
# make a <SELECT> input tag using the following values:
%db_select_fields = (

Add this and see what happens.

Code:
ExpireDays => '30,60,90,182,365',

And you should of added a Field to your database called ExpireDays as well.

Hope that helps

> >