Author Topic: DropDownList in upload_form  (Read 10779 times)

0 Members and 1 Guest are viewing this topic.

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
DropDownList in upload_form
« on: May 08, 2006, 10:38:08 PM »
Hi everybody

I have implemented the following code in memper_uploadform.html:

Code: [Select]
<td class="row1">
             <select class="input name="image_medium" size="1">
               <option value="Digitalaufnahme">unbekannt</option>
               <option value="Digitalaufnahme">Digitalaufnahme</option>
               <option value="Dia Kleinbild">Dia Kleinbild</option>
               <option value="Dia Mittelformat">Dia Mittelformat</option>
               <option value="Dia Grossformat">Dia Grossformat</option>
               <option value="Negativ Kleinbild">Negativ Kleinbild</option>
               <option value="Negativ Mittelformat">Negativ Mittelformat</option>
               <option value="Negativ Grossformat">Negativ Grossformat</option>
             </select> 

I have implemented the following Code in db_field_definition.php

Code: [Select]
$additional_image_fields['image_medium'] = array($lang['image_medium'], "text", 0);
I created the filed image_medium in the table 4images_images and 4images_images_temp

Unfortunately the value entered by Dropdownlist is not be stored in the database.

So what did I wrong???

Thanks for helping me.

TIMT

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: DropDownList in upload_form
« Reply #1 on: May 09, 2006, 01:10:32 AM »
What type is your new field? It should be either VARCHAR(XX) or TEXT

P.S. make sure you added the line in db_field_definitions.php not inside the comment ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: DropDownList in upload_form
« Reply #2 on: May 09, 2006, 07:15:06 AM »
when I replace the following code

Code: [Select]
<tr>
            <td class="row1"><b>Originalmedium</b></td>
            <td class="row1">
             <select class="input name="image_medium" size="1">
               <option value="Digitalaufnahme">unbekannt</option>
               <option value="Digitalaufnahme">Digitalaufnahme</option>
               <option value="Dia Kleinbild">Dia Kleinbild</option>
               <option value="Dia Mittelformat">Dia Mittelformat</option>
               <option value="Dia Grossformat">Dia Grossformat</option>
               <option value="Negativ Kleinbild">Negativ Kleinbild</option>
               <option value="Negativ Mittelformat">Negativ Mittelformat</option>
               <option value="Negativ Grossformat">Negativ Grossformat</option>
             </select> 
            </td>
         </tr>

with this code:
Code: [Select]
<input type="text" name="image_medium"  size="4" value="{image_medium}" class="inputjahr" />
it works. The value entered in the new field is stored in the database.

But I'd like this dropdownlist above. Something is wrong with the dropdownlist. Where in the dropdownlist is the field in the database defined? Ist that name=?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: DropDownList in upload_form
« Reply #3 on: May 09, 2006, 07:57:35 AM »
you are missing a quote:[qcode]             <select class="input" name="image_medium" size="1">
[/qcode]
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: DropDownList in upload_form
« Reply #4 on: May 09, 2006, 08:34:58 AM »
Thank you!!!!    :D :oops:

Offline Melder

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: DropDownList in upload_form
« Reply #5 on: November 21, 2006, 11:05:26 AM »
Hi,

wie kann ich in ein Dropdown-Menü Text eingeben, welcher aber nicht gewählt werden kann? (als Überschriften um da eine gewisse Struktur reinzubekommen)

thx Achim

Offline pda

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: DropDownList in upload_form
« Reply #6 on: November 21, 2006, 12:50:20 PM »
Look at this example here to "organise" your dropdown box
A group can be made with the help of the <optgroup> tag


Code: [Select]
<select name="subject">
    <optgroup label="First Group">
          <option>Option 1</option>
          <option>Option 2</option>
          <option>Option 3</option>
    </optgroup>

   <option disabled="disabled" value="">This is an option tag which can`t be selected</option>

    <optgroup label="Another Group">
          <option>Option 1</option>
          <option>Option 2</option>
          <option>Option 3</option>
    </optgroup>

  <option>this is just an normal option tag</option>
</select>

Offline Melder

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: DropDownList in upload_form
« Reply #7 on: November 21, 2006, 02:08:09 PM »
Perfekt, genau das habe ich gesucht!!! Viele Dank - Thank you  :D