Forum


Calc Builder Support

Calc Builder support
Forums
Public write access is disabled. Please login

setting conditional upper and lower limits of a number field 08.11.2018 10:32

We calculate a price for a product with two configurations : config1 and config2 (option list field).

After the choice of the configuration the customer has than to give in a value of the width of the product in millimeters (number field).

For config1 the lower limit of the width is 1000 mm and the upper limit 4000 mm.
For config2 the lower limit of the width is 2000 mm and the upper limit 5000 mm.

Can this be set in the form fields so that the customer gets a warning when he choses a width which is not possible depending on the configuration he has chosen.

So with other words : is it possible to set conditional upper and lower limits of a number field based on a option list?

Regards,
AdK

Re: setting conditional upper and lower limits of a number field 09.11.2018 09:37

Hi,
that kind of specific validation is not configurable as default, but if you have some knowledge of javascript, you can extend the validator and add this special function to your field. At this tutorial entry you'll find detailed instructions and a working example on how to add custom validators to any field:

https://www.moonsoft.es/easyblog/entry/23-code-tip-add-custom-validation-to-form-fields

Hope this helps, regards
Moonsoft Team
www.moonsoft.es

Re: setting conditional upper and lower limits of a number field 10.11.2018 11:09

Thanks for the reply.

Unfortunately I do not have any knowledge of Javascript but I will give it a try and I will study your tutorials thoroughly.

Before I start with your Calc Builder I did not have any knowledge of PHP but it goes quiet well so why not with Javascript.

Regards,
AdK

Re: setting conditional upper and lower limits of a number field 12.11.2018 09:38

Hi,
ok, you can give it a try and we can send any quick tip if you get stuck. In case you need to build any more complex code, please note we also have a custom calculator service, for which we can fully configure the calculator for you including any custom function needed. If at any time you want to ask for a quote you can use the private helpdesk in order to send your requirements.

Regards
Moonsoft Team
www.moonsoft.es
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Our clients' feedback