Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

problem: how take checkbox value?


Go to End


1289 Views

Avatar
bebabeba

Community Member, 193 Posts

14 November 2008 at 5:39am

Hi!
Can you help me to take checkbox value?I need showing in my page site the value that I select in checkbox.So if I select "5 stelle" I want see in my page site "5 stelle" I have a function function doRicettivita($data, $form) that take the value of the form.
I create checkbox in this way:

new CheckboxSetField(
$name = "categoria",
$title = "Categoria:",
$source = array(
"1" => "5L stelle",
"2" => "5 stelle",
"3" => "4 stelle",
"4" => "3 stelle"
),
$value = "" //mi dice quale selezionare per prima nella chekc
)