I'm trying to set a text field in a form to read-only so it cannot be edited by the user. The HTML for this would be
The code I'm using is:
$TotalAmountField = new TextField('TotalAmount', 'Total To Pay (NZD)', '' ); $TotalAmountField -> performReadonlyTransformation(); $fields = new FieldSet( new TextField('FirstName', 'Your First Name', '' ), new TextField('LastName', 'Your Last Name', '' ), $TotalAmountField );
This doesn't seem to work and after quiet a bit of digging through documentation I'm still not sure what to do.
If anyone could give me the correct solution to this it'd be appreciated.