Reputation: 76
In asp.net, server side control have a property called ClientID, which can be used to get the id that template engine generated for a server side control, is there a similar thing in SilverStripe, to get the id of the input element rather than its .field wrapper?
thanks
Upvotes: 1
Views: 113
Reputation: 1809
Have a look at the ID method of FormField
http://api.silverstripe.org/3.1/class-FormField.html
In your templates, you should be able to use
$Fields.FieldByName(FieldName).ID
Upvotes: 1