PDA

View Full Version : [CLOSED] disabled controls values not available in model



PriceRightHTML5team
Aug 06, 2013, 1:19 PM
Hi mine is a cshtml page in which through following client side script am disabling 2 datefields and a combobox


App.dtFrom.setDisabled(true);
App.dtTo.setDisabled(true);
App.CmbUpdateFrequencyInmonths.setDisabled(true);

on form post these controls values and not available in model.
They are set to default.

How to get disabled controls values in model

Daniil
Aug 06, 2013, 3:08 PM
Hi @PriceRightHTML5team,

Disabled fields are not submitted. We can recommend to use ReadOnly instead.

PriceRightHTML5team
Aug 07, 2013, 7:26 AM
Hi
set readOnly=true for combo box worked fine.
but DateField remains editable.
see image -> 6717

how to resolve this issue

Daniil
Aug 07, 2013, 11:22 AM
A DateField with ReadOnly="true" should not have a trigger. So, I assume the DateFields on the screenshot are not read-only.