Hi,
I am using the following code to load data in a form which is entered in a different form from the previous page:
{FormBuilder form='rekenform_opdracht' value_fld220=$smarty.session.fbparams.achternaam value_fld99=$smarty.session.fbparams.street value_fld100=$smarty.session.fbparams.postcode value_fld118=$smarty.session.fbparams.city
value_fld104=$smarty.session.fbparams.emailstart value_fld105=$smarty.session.fbparams.emailstart value_fld102=$smarty.session.fbparams.telefoonnummer}
However at value_fld99=$smarty.session.fbparams.street I would like the default value to not only have streetname but also streetnumber, I have been trying all kind of combinations but I can't seem to find the solution:
value_fld99=$smarty.session.fbparams.street+$smarty.session.fbparams.streetnumber
I'm thinking now while typing I could do
{capture assign="streetplusnumber"}
{$smarty.session.fbparams.street}
{$smarty.session.fbparams.streetnumber}
{/capture}
value_fld99=$streetplusnumber
I suppose that would work, but maybe someone can provide a better option.
Regards,
Philippe
[solved] Formbuilder input field multiple default values
[solved] Formbuilder input field multiple default values
Last edited by sumpson on Wed Feb 11, 2015 10:52 am, edited 1 time in total.
Re: Formbuilder input field multiple default values
I think this should work:
http://www.smarty.net/docs/en/language. ... dp32003888
where the ... is the rest of your tag.
Code: Select all
{... value_fld99="{$smarty.session.fbparams.street} {$smarty.session.fbparams.streetnumber}" ...}
where the ... is the rest of your tag.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Formbuilder input field multiple default values
Try
or if you want to separate them after use a split i.e.
Then
Code: Select all
value_fld99=$smarty.session.fbparams.street|cat:$smarty.session.fbparams.streetnumber
Code: Select all
value_fld99=$smarty.session.fbparams.street|cat:','|cat:$smarty.session.fbparams.streetnumber
Code: Select all
{assign var="Array" value=","|explode:$value_fld99}
Re: Formbuilder input field multiple default values
Thanks! I now have:
{FormBuilder form='rekenform_opdracht' value_fld220=$smarty.session.fbparams.achternaam value_fld99=$smarty.session.fbparams.street|cat:' '|cat:$smarty.session.fbparams.streetnumber value_fld100=$smarty.session.fbparams.postcode value_fld118=$smarty.session.fbparams.city
value_fld104=$smarty.session.fbparams.emailstart value_fld105=$smarty.session.fbparams.emailstart value_fld102=$smarty.session.fbparams.telefoonnummer}
which is perfect!
{FormBuilder form='rekenform_opdracht' value_fld220=$smarty.session.fbparams.achternaam value_fld99=$smarty.session.fbparams.street|cat:' '|cat:$smarty.session.fbparams.streetnumber value_fld100=$smarty.session.fbparams.postcode value_fld118=$smarty.session.fbparams.city
value_fld104=$smarty.session.fbparams.emailstart value_fld105=$smarty.session.fbparams.emailstart value_fld102=$smarty.session.fbparams.telefoonnummer}
which is perfect!