pdfFormField default value
-
Hello! Is it posible to give a default value to a pdfFormField using handlebars?
I tried something like this and it's not working:{{{pdfFormField name='familyName' color='#FF0000' required=true
type='text' width='200px' height='40px'
value={{familyName}}
}}}
-
The
pdfFormField
is a handlebars helper, so you need to proceed in the same way as when calling other helpers.Filling attribute value from context using path
You shouldn't put the path to the brackets
{{}}
when filling helpers parameter. It should look likevalue=myData
Demo
https://playground.jsreport.net/w/anon/XgVqQLNTCalling extra helper to fill the param
You need to use subexpression to call another handlebars helper as attribute param. It should look like
value=(myHelper)
Demo
https://playground.jsreport.net/w/anon/SMSHyEw3Documentation
https://handlebarsjs.com/guide/expressions.html#subexpressions