- Posts: 9
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
STR_PAD_LEFT
- Archaeos
- Topic Author
- Offline
- New Member
Less
More
7 years 11 months ago #135028
by Archaeos
STR_PAD_LEFT was created by Archaeos
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.
Thanks.
Thanks.
The topic has been locked.
- first
- Offline
- Elite Member
Less
More
- Posts: 256
- Thank you received: 37
7 years 11 months ago #135045
by first
Survey Designer and Programmer
Replied by first on topic STR_PAD_LEFT
here
is the list of support EM functions. Is this something you are looking for?
Survey Designer and Programmer
The topic has been locked.
- Archaeos
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
7 years 11 months ago #135077
by Archaeos
Replied by Archaeos on topic STR_PAD_LEFT
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.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
7 years 11 months ago #135110
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic STR_PAD_LEFT
I think EM don't have the fourth parameter.
Then need another system
Something like this maybe:
Then need another system
Something like this maybe:
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- Archaeos
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
7 years 11 months ago #135154
by Archaeos
Replied by Archaeos on topic STR_PAD_LEFT
Thanks, that works out great.
The topic has been locked.