SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2008
    Posts
    159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question how to do this with html_options tag ?

    hi,
    i want add additional parameter to <select options> which created by smarty using this tag :
    <!--{html_options name=dd options=$myOptions1 selected=$mySelect1 }-->

    i wand add " id="name[]" to the tage , to add it to the created select options to be like this :

    <option label="a" value="a" id="name[1]">a</option>
    <option label="a" value="a" id="name[2]">a</option>
    ..
    ..
    ،،،
    i tried to edit the tag and add it to be like :
    <!--{html_options name=dd options=$myOptions1 selected=$mySelect1 id="name[]"}-->

    but it didn't success , so my question is it possible to do this ? if yes ، How ?

    Thanks,

  2. #2
    SitePoint Enthusiast WMX's Avatar
    Join Date
    Sep 2008
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    name[1] is an invalid id. You would want to change it to name_1 at least. Additionally, you can't set an id using Smarty's html_options function.
    ~


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •