ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

'Link' Select Dropdown

May 11, 2012 2:13pm

Subscribe [3]
  • #1 / May 11, 2012 2:13pm

    jonwrightmedia

    75 posts

    I’m sure the solution to this one is simple, but after a long day trying to beat a deadline my head is hurting!

    All I want to do is use a drop down list in a form to link to the ‘detail’ page of the article.

    So a visitor selects the article they want to read from the drop down list, then presses ‘submit’ and they are taken to the detail template.

    For the life of me, I can’t figure out how to get the url_title to pass through when I submit the form.

    <form action="{path=participants/view/}" method="post">
    Or select a Participant - See full list
    <label for="participant">Participant</label>
    <select name="participant" id="participant">
     {exp:channel:entries channel="participants" orderby="title" sort="asc"}
      <option value="{url_title}">{title}</option>
     {/exp:channel:entries}
    </select>
    <input class="btn" type="submit" value="View" /></p> 
    </form>
  • #2 / May 11, 2012 2:44pm

    Rob Allen

    3114 posts

    Have a look at the categiries drop down at http://ellislab.com/expressionengine/user-guide/modules/channel/categories.html#category-dropdown-menu - you can modify that to use channel entries instead.

  • #3 / May 12, 2012 4:08am

    jonwrightmedia

    75 posts

    Thanks for the reply.

    I ideally wanted a submit button so that the visitor is immediately taken away from the page f they make a mistake.

    I’ll take a look.

  • #4 / May 14, 2012 1:11pm

    Shane Eckert

    7174 posts

    Hello jonparadise2,

    Did you get a chance to take a look at Rob’s suggestion?

    What do you think?

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases