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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Set Default Value in UserForm


Go to End


2 Posts   890 Views

Avatar
quanto

Community Member, 91 Posts

25 November 2011 at 3:21am

I'd like to know if there's any posibility to get the label ($NAAM) as default value in the input field of the UserDefinedForm?

Example:

<div id="EditableTextField1" class="field text  requiredField">
<label class="left" for="Form_Form_EditableTextField1">$NAAM</label>
<div class="middleColumn"><input type="text" class="text requiredField" id="Form_Form_EditableTextField1" name="EditableTextField1" value="$NAAM" /></div>
</div>

Avatar
Willr

Forum Moderator, 5523 Posts

25 November 2011 at 9:09pm

I'd like to know if there's any posibility to get the label ($NAAM) as default value in the input field of the UserDefinedForm?

Nothing built into the module to support this but if you require it, perhaps add a Default Value setting to EditableTextField::getFieldConfiguration(). Would be a good enhancement to commit back to the module if you get it working!