Hello,
Is it possible to provide initial values when working with the form extension? For example, filling a textarea with a predefined string, which the user can then edit?
Thank you
Hello,
Is it possible to provide initial values when working with the form extension? For example, filling a textarea with a predefined string, which the user can then edit?
Thank you
You can do your own custom form using a template. The forms are not limited to forms created by dbr.form command, you are free to create your own forms.
Alternatively, use JavaScript to set the default values after the form has been loaded.
--
myDBR Team
With the latest build, you can now set the initial values for the elements.
--
myDBR Team
Great, thank you! I can't find how to do so in the docs though, how do I do it?
Check the documentation for default*
parameters.
For example, you can do:
select 'dbr.form', 'textarea', 'comment', 'Comments / improvement ideas', 'required', 'This is the initial text';
select 'dbr.form', 'date', 'license_date', 'License date', 10, 'required', current_date();
select 'dbr.form', 'text', 'contact_info', 'Contact info', 50, null, 'This is the initial text';
You can also set default values for radiobuttons and checkboxes.
--
myDBR Team
Amazing, thank you!
You must log in to post.