Tiki and PluginR

Numerical Field validation in Prettytracker to execute R code

posts: 14 SPAIN

Hi all,

I'd need to add a restriction in a numerical field from a tracker but I don't find the way...

In particular, I have some fields corresponding to probabilities, so I'd need some kind of warning in case the user enter a negative value (or higher than 1).

I've tried using Jquery, but I failed cry

Also, with "PluginTrackerIf"...

Is there any "easy way" to add a restriction validation for a numerical variable?



posts: 1785 Catalan Countries

Hi Moisés:

I would suggest that you try the validation feature, already implemented in Tracker fields:


You can create your own validation methods, it seems, as documented there, or use the regexp validation type, so that you can use your own regular expression there, without creating any new php file, etc.

Unfortunately, I'm not that good at regular expressions, but I bet that it's the besst approach for waht you want to achieve.

If you want to share some examples for your case, once you know how to do it, you can update this page:



posts: 14 SPAIN


Thank you Xavi. Using a regular expression it works perfectly:


I've posted an example in the page you've mentioned:

Hope this helps other tiki-people, hahaha



posts: 1785 Catalan Countries

Great! thanks also to you for updating that doc page! :-)

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.