Does limesurvey support STR_PAD_LEFT? I am using: str_pad(storeNum, 5, '0', STR_PAD_LEFT) but LS wont recognize pad left. It gives me a "undefined variable" error.
I dont think so. I was working off of
this
in an equation field. Basically I have a place where someone enters their store number which can be at max 5 numbers. But all store numbers have leading 0. So if someone enters in store 20, their real store number is 00020. To make sure that the store number shows correctly even when people dont enter the leading zero I made the above code in a hidden equation field. So LS has support for str_pad and it works using just str_pad, it just pads with zeros the wrong way (default is right) but I need it to pad left.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.