I am using Twitter Bootstrap 3. The HTML for the switches should look like this:
<div class="radio"> <label> <input type="radio" name="search_text_source" value="title" /> In the title </label> </div> <div class="radio"> <label> <input type="radio" name="search_text_source" value="content" /> In the content </label> </div> ...
In the form, I create the switches as follows:
$this->add(array( 'name' => 'search_text_source', 'type' => 'radio', 'options' => array( 'value_options' => array( 'title' => 'In the title', 'content' => 'In the content', 'description' => 'In the description', ), ), ));
How can I separate each switch in a script view?
PS: Or any solution that will create as html code using a form.
EDIT:
Thanks to Sam. But I will leave these options for more complex cases. During the experiments, the following happened (with the standard view assistant):
// in view script: <? $this->formRadio()->setSeparator('</div><div class="radio">'); ?> <div class="radio"> <?php echo $this->formRadio($form->get('search_text_source')) ?> </div>
Once again, thanks to Sam for his help, I won’t understand without him.
user2627106
source share