[SOLVED] CGUserDirectory Search form checkbox

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
syreeni
New Member
New Member
Posts: 8
Joined: Wed May 21, 2014 1:15 pm

[SOLVED] CGUserDirectory Search form checkbox

Post by syreeni »

Hi,

What would be the code for checkbox in Search Form Template?

There is only text and select as default:

Code: Select all

    {else if $data.fieldtype == 'select'}
      <select name="{$actionid}ud_propvalue[{$propname}]">
      {html_options options=$data.options}
      </select>
Last edited by syreeni on Thu Jun 05, 2014 2:29 pm, edited 1 time in total.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1968
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGUserDirectory Search form checkbox

Post by Jo Morg »

That is a Smarty function: http://www.smarty.net/docs/en/language. ... ptions.tpl and used to create dropdowns.
What are you trying to accomplish?
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
syreeni
New Member
New Member
Posts: 8
Joined: Wed May 21, 2014 1:15 pm

Re: CGUserDirectory Search form checkbox

Post by syreeni »

I've Frontend User Management module and there are 9 properties with checkbox. I need a Smarty checkbox code for CGUserDirectory search form.

It should be possible to search with them on different alternatives. I call it

{CGUserDirectory action="search" searchproperty="province,city,service1,service2,service3,service4,service5,service6,service7,service8,service9"}
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1968
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGUserDirectory Search form checkbox

Post by Jo Morg »

http://www.smarty.net/docs/en/language. ... kboxes.tpl
I didn't test it myself but it might work.

Code: Select all

{html_checkboxes name="{$actionid}ud_propvalue[{$propname}][]" options=$data.options}
Check the link for details on how to use it...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
syreeni
New Member
New Member
Posts: 8
Joined: Wed May 21, 2014 1:15 pm

Re: CGUserDirectory Search form checkbox SOLVED

Post by syreeni »

Code: Select all

{elseif $data.fieldtype == 'checkbox'}
<input type="checkbox" name="{$actionid}ud_propvalue[{$propname}]" value="1"/>
Post Reply

Return to “Layout and Design (CSS & HTML)”