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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   1038 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!