Page 1 of 1

Tips and hints

Posted: Fri Oct 12, 2018 10:36 am
by steve.runyeard
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:


Re: Tips and hints

Posted: Fri Oct 12, 2018 10:49 am
by steve.runyeard
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:

var input = $(this);
var value = input.val();

Then you simply put this custom action on the click event of the 'Next' button just before any validation is done (if you have validation) or just before the form action to navigate to the next page.

Re: Tips and hints

Posted: Fri Oct 12, 2018 3:03 pm
by steve.runyeard
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 resume a form using a form id and password from hidden fields.

var formId = $('#myPage_C41_').val();
var formPassword = $('#myPage_C42_').val();"~?a=myform&action=resume&f="+formId+"&pwd="+formPassword);