Formbuilder Select on pages

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
zimmo
Forum Members
Forum Members
Posts: 27
Joined: Fri Sep 28, 2012 9:00 am

Formbuilder Select on pages

Post by zimmo »

I am using the older version of cmsms (only because I know it well) will eventually move to the new version.

Is this possible, as I am strugging to see how and hope someone might know the solution.

I want to create a basic select form. I need the select to be populated with a list of the pages within a sub section.

So for example I have a drop down (form select) and submit button. The select I want to have a list of all the pages which are a child of one of the main pages.

So:

Main page: Products
Sub pages - Product 1, Product 2, Product 3 etc..

The value is the url and when the user clicks submit it takes them direct to that page. Can this be done with formbuilder, or is there a specific tag that can achieve this. So if a new product page was added the form would update with this new page in the drop down.

I hope this is put in the right place on the forum and that it can be achieved.

We love CMSMS for its simplicity, and I have had loads of clients say how easy the back end is to use in comparison to other cms systems, so pat on the back to all at CMSMS.

Thanks
Barry
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Formbuilder Select on pages

Post by Dr.CSS »

If these are actual pages and not something generated by the "Products" module you can make a 'select' menu template and use
<form action="../">
<select onchange="window.open(this.options[this.selectedIndex].value,'_top')">
<option value="">Choose a language </option>

to make it go to the page selected...
zimmo
Forum Members
Forum Members
Posts: 27
Joined: Fri Sep 28, 2012 9:00 am

Re: Formbuilder Select on pages

Post by zimmo »

Hi Dr CSS

Thank you, I managed to get this to work, by creating a menu in menumanager. Here is the code for the menu for this to work, so you can build a menu of pages that can be used as a selector.

Code: Select all

{if isset($nodelist)}
{strip}
<form class="yourclass" name="yourname" method="post" action="#"> 
<fieldset>
<select onchange="window.open(this.options[this.selectedIndex].value,'_top')">
{foreach from=$nodelist item='node'}
<option value="{$node->url}">{$node->menutext}</a></option>
{/foreach}
</select>
</fieldset>
</form>
{/strip}
{/if}
Of course replace the css with your class and also the form name of your choice.
Post Reply

Return to “Modules/Add-Ons”