We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1266
    • 50 Posts
    I’m a bit of a newbie here, so please bear with me:

    How would I add a select form input as a custom field. I’ve figured out how to make it show, but how do I actually send that value to the DB?
    <select name="[+maxigallery.fieldnames.category+]" onChange="document.editform.[+maxigallery.fieldnames.modified+].value='yes'">
              <option value="[+maxigallery.picture.category:htmlent+]"> [+maxigallery.picture.category:htmlent+]</option>
               <option value="event">Event</option>
               <option value="product">Product</option>
               <option value="promotional">Promotional</option>
     </select>
    
      • 7923
      • 4,213 Posts
      Try to add the field as hidden input field and use javascript to change its content, eg. something like:

      <input type="hidden" name="[+maxigallery.fieldnames.category+]" value="[+maxigallery.picture.category:htmlent+]" />
      <select onChange="document.editform.[+maxigallery.fieldnames.modified+].value='yes';document.editform.[+maxigallery.fieldnames.category+].value=this.value;">
                <option value="[+maxigallery.picture.category:htmlent+]">[+maxigallery.picture.category:htmlent+]</option>
                 <option value="event">Event</option>
                 <option value="product">Product</option>
                 <option value="promotional">Promotional</option>
      </select>
      


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 1266
        • 50 Posts
        that did it! thanks so much for the help and for making MaxiGallery in the first place