Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Multi Select

Quote Reply
Multi Select
Hi,

I want to use a multi select field but do not know what to write into the include_form.html
I added a new field called language in the database, and everything works in the admin section.

Waht do I have to do?

<select size="3" name="language" multiple>
<option>engl</option>
<option>germ</option></select>

Quote Reply
Re: [SvenL] Multi Select In reply to
You should use:

Quote:

<select name="Language" size="3">
<option value="engl">English</option>
<option value="germ">German</option>
</select>


Don't need the multiple attribute.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Chewbaca] Multi Select In reply to
If I want to modify a link, via modify.cgi
the activated fields are not marked. All fields are blank.
Quote Reply
Re: [SvenL] Multi Select In reply to
Look at the "Category" field as a reference. Basically, you need to pull the value that has been "added" in the "Language" column to show up as SELECTED.

Also, exactly what codes are you using? Are you using the set of codes I gave??

The codes I gave will work for the "Add" form.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [SvenL] Multi Select In reply to
Hi,

You need to do:

<select size=3 name="language" multiple>
<option<%if language like 'engl'%> selected>engl</option>
<option<%if language like 'germ'%> selected>germ</option>
...
</select>

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: [Chewbaca] Multi Select In reply to
In Reply To:
Look at the "Category" field as a reference. Basically, you need to pull the value that has been "added" in the "Language" column to show up as SELECTED.[/quote]
Where can I find the "Category" field? In modify.cgi
it only uses <%Category%>, but <%Language5> does not work

Quote:
Also, exactly what codes are you using? Are you using the set of codes I gave??

Yes i used your code.

Quote:
The codes I gave will work for the "Add" form.

Yes, it does for add but not well for modify

Quote Reply
Re: [Alex] Multi Select In reply to
I did it.

<SELECT size="6" name="language" multiple><option<%if language like 'engl'%> selected<%endif%>>engl</option><option<%if language like 'germ'%> selected<%endif%>>germ</option>... </select>