Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

XML Schema for config value typecasting

  • Bigred01
  • Bigred01's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 years 10 months ago #169458 by Bigred01
XML Schema for config value typecasting was created by Bigred01
I absolutely love the new lime. I have been living with 2.5 for years now and am finally re-writing all of our custom junk for the newest version. I have ran into an issue on php 7.2 for question theme options. readonly_when_active false is a string so its being validated as true and the advanced option inputs are loading disabled once the survey is live. It was an easy fix but made me think that since themes at template or question level all use the xml configs, maybe a schema for setting proper types might be a good idea.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago - 5 years 10 months ago #169694 by DenisChenu
Replied by DenisChenu on topic XML Schema for config value typecasting
Empty string is false secure.php.net/manual/en/language.types.boolean.php

Then set default value to "" send false, no ?

But more : default is set (or must be set) here : github.com/LimeSurvey/LimeSurvey/blob/36...onAttribute.php#L305

Then : not send it in your xml and you have your false. Send it to 1 or " " return true.

PS : but you're right , a clean schema is something to be done :)

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.
Last edit: 5 years 10 months ago by DenisChenu.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose