Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » print checkbox value in my page

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1054 Views
  • bebabeba
    Community Member
    192 Posts

    print checkbox value in my page Link to this post

    I must take the value (or values) choose in a checkbox and print in my page. What I wrote is wrong, can you help me to correct?

    new CheckboxSetField(
                $name = "categoria",
                $title = "Categoria:",
                $source = array(
                 "1" => "5L stelle",
                 "2" => "5 stelle",
                 "3" => "4 stelle",
                "4" => "3 stelle"

    function doRicettivita($data, $form) {
          if(!empty($data['nome'])) //this is a textfield
          { $data = array('Nome' => $data['nome'], 'Categoria' => $data['categoria']);
          //return $a;
          return $this->customise($data)->renderWith(array('SearchPage_results', 'Page'));

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.