Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added maxvvalue and minvalue attributes for input fields #145

Merged
merged 5 commits into from
Sep 12, 2013

Conversation

kissifrot
Copy link

Added maxvvalue and minvalue attributes for decimal and integer input fields, which adds client-side check for values

@kissifrot
Copy link
Author

If I modify the jFormsCompiler_jf_1_1.class.php file instead of jFormsCompiler_jf_1_0.class.php (which would be the correct way , as type="integer" isn't supposed to be in 1.0 forms XML) as I did, the minvalue thing doesn't work due to the code being generated in the wrong order:

$ctrl->datatype->addFacet('minValue',0);
$ctrl->datatype->addFacet('maxValue',100);
$ctrl->datatype= new jDatatypeinteger();
$ctrl->required=true;

instead of

$ctrl->datatype= new jDatatypeinteger();
$ctrl->required=true;
$ctrl->datatype->addFacet('minValue',0);
$ctrl->datatype->addFacet('maxValue',100);

Any idea on how to circumvent this?

laurentj added a commit that referenced this pull request Sep 12, 2013
Added maxvvalue and minvalue attributes for input fields
@laurentj laurentj merged commit d9ae7e3 into jelix:master Sep 12, 2013
@laurentj
Copy link
Member

Thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants