In This Article:

    Turn picklists into radio buttons!

    In This Article:

      Background

      Salsa usually shows picklist custom fields as a dropdown box:

      tee_shirt_original.png

      How would you like to see the same custom field as a list of radio buttons?

      tee_short_radio_buttons.png

      Like that?  Then read on!

      Prerequisites

      Before you begin, you'll need to have

      • the page that you would like to use.
      • the API name of the custom field. In this case, not "Tee Shirt Size" but "tee_shirt_size".

      Details

      We'll make the dropdown into a list of radio buttons using this Javascript:

      Installing into a template

      If you want the picklist custom field to always be a list of radio buttons wherever it appears, then this script needs to be installed into the templates that are used by your pages.  This may be one default template, or it may be several individual templates based on how you manage your Salsa HQ.  Here are some steps you can use:

      1. Edit the template.
      2. Locate the </head> tag.
      3. Insert a blank line just before the </head> tag. 
      4. Copy the script (above).
      5. Paste the script into the blank line.
      6. Replace the word "tee_shirt_size" with the API name of your picklist custom field.  Please make sure that the punctuation on that line remains unchanged!
      7. Save the template.
      8. Test!

      Installing into a donation page

      1. Edit the donation page.
      2. Click on the "Optional Text" tab.
      3. Locate the "Pre Submit Footer" field.
      4. If there is any content in the "Pre Submit Footer" field, then append an empty line to the contents.
      5. Copy the script (above).
      6. Paste the script after all other contents in the "Pre Submit Footer" field.
      7. Save the donation page.
      8. Test!

      Installing into a signup page

      1. Edit the signup  page.
      2. Click on the "Other Text" tab.
      3. Locate the "Content after the submit button" field.
      4. If there is any content in the "Content after the submit button" field, then append an empty line to the contents.
      5. Copy the script (above).
      6. Paste the script after all other contents in the "Content after the submit button" field.
      7. Save the donation page.
      8. Test!

      Installing into a action

      1. Edit the action page.
      2. Click on the "Other Text" tab.
      3. Locate the "Footer" field.
      4. If there is any content in the "Footer" field, then append an empty line to the contents.
      5. Copy the script (above).
      6. Paste the script after all other contents in the "Footer" field.
      7. Save the donation page.
      8. Test!

      Questions?
      If you have any questions then please send us a message, and we'll be glad to answer them!

      Was this article helpful?
      0 out of 0 found this helpful
      Have more questions? Submit a request

      Comments

      0 comments

      Please sign in to leave a comment.