user1435539
user1435539

Reputation:

In Symfony disabled field doesn't sent in request

In Symfony 1.4 if i have form contain disabled fields when i submit the form the disabled fields doesn't send in form fields

Upvotes: 1

Views: 1654

Answers (3)

Farly Taboada
Farly Taboada

Reputation: 96

no it is not actually "submitted", suggests use the object(a parameter of instantiating the form) to set its default value.

Upvotes: 0

ilSavo
ilSavo

Reputation: 854

It's an HTML behaviour. If you don't want some fields to be displayed, just make them hidden

Upvotes: 0

ivoba
ivoba

Reputation: 5986

This is probably no symfony issue but rather a normal HTML behaviour:

A disabled field is not even sent if the form is submitted. http://www.htmlcodetutorial.com/forms/_INPUT_DISABLED.html

Upvotes: 2

Related Questions