Is there any wayto add "" (Doubles quotes) value to textfield if the field is not authored?
Solved! Go to Solution.
Views
Replies
Total Likes
Yes you can use any value even "" as default value with the
<title
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Title"
name="./title"
value=""/>
How can we set default value as "" to a textfield?
Hi @hello299
Default value can be set in the textfield node by setting a property value as "".
You can check the details of all supported properties at "/libs/granite/ui/components/coral/foundation/form/textfield/render.jsp".
I hope, it helps.
Thanks
Yes you can use any value even "" as default value with the
<title
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Title"
name="./title"
value=""/>
Hi @hello299 ,
Yes! You can achieve that, kindly refer below snippet.
<demo
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Demo"
name="./demo"
value=""""/>
This will help you to pre-set value in dialog, additionally you can set it in many different way eg.
Hope that helps!
Regards,
Santosh
Views
Likes
Replies
Views
Likes
Replies