Search Form Problems

16 posts by 3 authors in: Forums > CMS Builder
Last Post: March 16, 2016   (RSS)

By Maurice - March 15, 2016

Hahahaha thats funny i wanted to ask the same Q.

but i have 3 dropdown fields to populate.

is there a better manual on the search engine?

thnx

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

Dropmonkey.nl

By Damon - March 16, 2016

Hi,

Here are some notes to hopefully help.

1. For the select, add in the name:

 <select class="form-control" id="courseID" name="courseID">

2. While testing, change the form method to get so you can see what search query values are being passed in the URL.

<form action="searchResults.php" method="get">

3. Check that the course_id field in the mite_course_id Section Editor is a list field type.

4. Try adding this stripped down code to see if this outputs the all the list field list options:

<?php foreach (getListOptions('mite_course_id','course_id') as $value => $label): ?>
   <?php echo $value;?> - <?php echo $label;?><br />
<?php endforeach ?>

Let me know if this shows the expected results. Also, can you post a link to your test page for me to look at here or email to support@interactivetools.com

Thanks!

Cheers,
Damon Edis - interactivetools.com

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

By Damon - March 16, 2016

Hi Maurice,

If the 3 dropdowns fields to populate are each based on different list fields in CMS Builder, you can use the same code block for each but modified as needed and with the section editor name and field name added. Example:

//select drop down
<select name = "myListField">
<?php foreach (getListOptions('mySection', 'myListField') as $value => $label): ?>
<option value = "<?php echo $value;?>"><?php echo $label;?></option>
<?php endforeach ?>

Just repeat and modify for each. 

Here is the list of other Search Field Formats:
http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html

And, as always, we are here to answer any other specific setup questions you have.

Cheers,
Damon Edis - interactivetools.com

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

By northernpenguin - March 16, 2016 - edited: March 16, 2016

Damon:  I made all your suggested changes, but the list still does not display.  Here is the page on my current sandbox (its a Google Cloud server)

http://www.legassie.net/index.php   -  choose the "Search database" menu item.

P.S.  I just noticed that eh "Submit" button is no longer display??

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

By Damon - March 16, 2016

Hi,

This error, that appears in the page source code, usually means that the field type reference in the code isn't a list field type.

<!-- Unknown optionsType ''!

Can you send in the CMS Builder login and FTP details so I can take a closer look:
https://www.interactivetools.com/support/email_support_form.php?priority=free&order=Forum%20Support

Thanks!

Cheers,
Damon Edis - interactivetools.com

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

By northernpenguin - March 16, 2016 - edited: March 16, 2016

Access to CMSB is not an issue, unfortunately with a Google Cloud server (Trial) running Ubuntu all I have is SSH access.  I will send you the file itself instead.

search.php attached.

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Attachments:

search.php 5K

By Damon - March 16, 2016

Ok thanks.

Can you also send in a Support Request with CMS Builder login details so I can take a look at the setup and check the code?

Cheers,
Damon Edis - interactivetools.com

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

I did with the link provide in your previous post

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

By Damon - March 16, 2016

OK thanks. I see it now.

Cheers,
Damon Edis - interactivetools.com

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