Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
I want to create a dropdown of folder options and then select items from the selected folder on form submit

heres the form code I have so far
Code: Select all
<form action="<cms:show k_folder_link/>"  enctype="multipart/form-data" method="post" class="form11" name="vacanciesFrom">
Currently showing:
   <select id="jobgroup" name="jobgroup" onchange="this.form.submit()">   
      <option value="All"  >All</option>
      <cms:folders masterpage='vacancies.php'>   
         <option value="<cms:show k_folder_name/>"><cms:show k_folder_title /></option>
      </cms:folders>       
    </select>
</form>      


the problem I have is because the masterpage is declared after the form declaration then the action of the form is blank but if I put the declaration outside of the form I get multiple forms instead of multiple options

My other question is I want an 'all' option, which would be the default selection on page load, how do i select from all folders

thanks in advance
I have worked out the showing of all bit

with a
Code: Select all
<cms:if k_is_folder >      
     <cms:pages masterpage='vacancies.php' folder=k_folder_name>   
         page detail here
     </cms:pages>
<cms:else/>
   <cms:pages masterpage='vacancies.php'>
           page detail here   
       </cms:pages>
</cms:if>


but still cant figure out the folder dropdown selector option
Please see if viewtopic.php?f=2&t=7387 is helpful.
brill thanks I had all of it sorted except the current option being selected and that has just sorted it for me :D
4 posts Page 1 of 1
cron