Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

How to get a drop down from database into signup form

Quote Reply
How to get a drop down from database into signup form
Included a field "dgraph_profession" in dgraph table as a Enum...

How do i get the same to appear automatically as a drop down menu on signup form. It comes in the Admin section fine...

Anup
Quote Reply
Re: [anup123] How to get a drop down from database into signup form In reply to
Hi Anup,

The join templates are "static", you will have to add the dropdown to the appropriate join_* template yourself and update as needed.

~Charlie
Quote Reply
Re: [Chaz] How to get a drop down from database into signup form In reply to
Hi Charlie,

I did update the join_* templates but what i get is a Text Box instead of the drop down. I am sure i would be missing something...

<input type="select" name="dgraph_profession" option value="<%dgraph_profession%>">

Any suggestions or is it that every time a new option is added to the dgraph_profession, the pages will have to be updated manually.

Anup
Quote Reply
Re: [anup123] How to get a drop down from database into signup form In reply to
Try this:
Code:
<select name="dgraph_profession">
<option value="IT">IT</option>
<option value="public service">Public Service</option>
<option value="whatever">Whatever...</option>
</select>

[edit]
RE:
Quote:
Any suggestions or is it that every time a new option is added to the dgraph_profession, the pages will have to be updated manually.

For the most part, yeah, you will have to update the list manually. Althoug, I'm sure you can biuld a routine that pulls enum info from the column and builds a select. You can use the output of that in a template var.
[/edit]

~Charlie

Last edited by:

Chaz: Mar 4, 2003, 4:53 PM