Gossamer Forum
Home : Products : Gossamer Links : Discussions :

custom categories - user side

Quote Reply
custom categories - user side
Newbie here - so, please bear with me if this is a really dumb question.

We've added two custom categories to our database - a country list and a yes/no select dropdown menu list.
They are working in admin mode but, when I go to add them to the form.txt page so that they display for the user I get no joy. Have tried adding them as <%ColumnNameHere%> but, no luck so far. I keep getting the message "unknown tag"

Basically, how the heck do you do it???

Any help would be fantastic...

Ian

Quote Reply
Re: custom categories - user side In reply to
What TEMPLATE did you add the codes in???

You need to use the CUSTOM COLUMNS for the CATEGORY table within the category.html or subcategory.html template files.

Regards,

Eliot Lee
Quote Reply
Re: custom categories - user side In reply to
I am one of iclethero's colleagues.

Thanks for your response Eliot but, the problem lies with the add.cgi and modify.cgi pages. The output for the links is absolutely fine - it's just the setup of forms.txt to allow user input into the database through add.cgi and modify.cgi...

I have tried setting up the select lists so that the db records the inputted data correctly via the <%categoryName%> tags in the HTML - but, have had no success.

Hannah

Quote Reply
Re: custom categories - user side In reply to
Hi,

It's best to wrap them in in if tags so it would look like:

<tr>
<td>Country: </td>
<td><input name=Country value="<%if Country%><%Country%><%endif%>"></td>
</tr>

That way it is filled in properly if they submit and there is an error, and if they first come to the page and haven't entered anything.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: custom categories - user side In reply to
I tried this solution Alex, but, it only provides a text box entry field for the coutry - i want to use a select list. how would i do this?

thanks for all your help

Quote Reply
Re: custom categories - user side In reply to
You would need to do:

<select name="Country">
<option<%if Country eq 'Canada'%> selected<%endif%>>Canada
<option<%if Country eq 'USA'%> selected<%endif%>>USA
..
</select>

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: custom categories - user side In reply to
Thanks a lot Alex, i'll give it a whirl

Hannah
:-)