Gossamer Forum
Home : Products : Gossamer Links : Discussions :

replacing 'select' field with a 'smallint' field

Quote Reply
replacing 'select' field with a 'smallint' field
Hi

in the Links database, is there an 'easy' way to replace a 'select field' with a 'smallint' field?

At present I use a 'select' field for one of the Links database fields: 'price' with values like this: £30, £40, £50 etc

So I have 400 records with valuse like: £30, £40, £50 etc...

I would like to replace this with a combination of 'currency' select field & a 'smallint' input field for 'price_new'

Select: GBP £ or EUR €
Value (price_new): 123

I know how to add fields, edit the relevant html template pages etc.

But in doing this, the new field 'price_new' to be dislayed on the link and deatiled page will be empty for the 400 records?

Is there some easy work around for this?

Would something like this work?

<input type="text" id="price_new" name="price_new" value="<%if price_new%><%escape_html price_new%><%else%><%price%><%endif%>" class="text" />

any help / advice appreciated

Thanks
Colin Thompson
Subject Author Views Date
Thread replacing 'select' field with a 'smallint' field colintho 1589 May 8, 2008, 8:00 AM
Thread Re: [colintho] replacing 'select' field with a 'smallint' field
Andy 1535 May 8, 2008, 8:04 AM
Post Re: [Andy] replacing 'select' field with a 'smallint' field
colintho 1521 May 8, 2008, 8:52 AM