Exclude options in category drop down in form

14 posts by 2 authors in: Forums > CMS Builder
Last Post: July 30, 2014   (RSS)

By design9 - July 30, 2014

tablename = dir_categories

fieldname = name   (value and label)

I was using the get list options so it would not reset the drop down on submit or user error message. 

One other question: Using the add form.php, it has a  action="?preSaveTempId=<?php echo $preSaveTempId ?>" for the action. Is there another way that I can still submit the form and send it to a separate thank-you page?

I have also included my file if you need to look at that. 

Thanks for all your help with this!!!

Attachments:

freeform1.php 23K

By design9 - July 30, 2014

That works but then I go back to the issue of if the user forgets to fill out a required field, then the drop down category options are not retained and user would have to refresh page to get drop down options again. Is there anyway around that without using the getlistOptions?

By claire - July 30, 2014

Yeah, same solution as what I mentioned here: http://www.interactivetools.com/forum/forum-posts.php?postNum=2234613#post2234613

If you're using jQuery, for example, you can check if the category options are set using PHP and then optionally include jQuery statements on document load to set them when the page is refreshed after an error.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/