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

write value form in external database


Go to End


1157 Views

Avatar
bebabeba

Community Member, 193 Posts

22 November 2008 at 4:06am

Hi!
I create a page with form. I want take the value of this form to memorize that in an external database. My problem is how implement the function that write forma value in my sql external database.
this are my form:

function Ricettivita() {
// Create fields
$fields1 = new FieldSet(
new TextField(
$name = "nome",
$title = "Nome da ricercare:",
$value = ""
),
new CheckboxSetField(
$name_t = "tipologia",
$title = "Tipologia:",
$source = array(
"1" => "Hotel",
"2" => "Agriturismo",
"3" => "Bed & Brekfast",
"4" => "Residence",
"5" => "Ospitalità su richiesta"

),
$value = ""
)

);

// Create actions
$actions = new FieldSet(
new FormAction('doRicettivita', 'CERCA')
);

return new Form($this, 'Ricettivita', $fields1, $actions);
}