Search found 3 matches
- Fri Oct 12, 2018 3:03 pm
- Forum: General
- Topic: Tips and hints
- Replies: 2
- Views: 9593
Re: Tips and hints
Do you need to create a button with a dynamic link? Here's a method. Put the values you wish to use in your link into hidden values and then in the click action on the button call some custom Javascript to build the url and then navigate to it. The following custom action will create the link to res...
- Fri Oct 12, 2018 10:49 am
- Forum: General
- Topic: Tips and hints
- Replies: 2
- Views: 9593
Re: Tips and hints
If you have a form page and you want all the empty input boxes to default to the value of zero when you progress to the next page then create yourself a custom action containing the following: $("input").each(function(){ var input = $(this); var value = input.val(); if(value=="") input.val(0); }); T...
- Fri Oct 12, 2018 10:36 am
- Forum: General
- Topic: Tips and hints
- Replies: 2
- Views: 9593
Tips and hints
Here's a regular expression you might find useful. It will match against UK currency amounts (with optional pound and pence symbols).
Examples of values that will match:
1.12
£1.12
12p
£145.55
£11,400.15
Regex:
^\£?\-?(?:0|[1-9]\d{0,2}(?:,?\d{3})*)(?:\.\d+)?p?$
Examples of values that will match:
1.12
£1.12
12p
£145.55
£11,400.15
Regex:
^\£?\-?(?:0|[1-9]\d{0,2}(?:,?\d{3})*)(?:\.\d+)?p?$