Skip to main content
Kmanning1911
New Participant
August 27, 2021
Answered

Custom Subscripts for a Range

  • August 27, 2021
  • 1 reply
  • 823 views

I'm trying to find out if there is a subscript that I can enter into the custom validation field that will allow mes to create a customizable range going forward for numbers.

 

I want to put a customizeable limit on a dollar amount field for a temporary home offer.   Right now I have the document set up to enter your own amount but there isn’t a cap on that dollar amount so the potential homebuyer could enter any amount into the form.

 

I need to be able to cap the dollar amount to a particular number so that potential buyers don't go over a specific limit.

This topic has been closed for replies.
Correct answer Nesa Nurani

Use this as validation script:

var maxAmount = 100000;
if(event.value > maxAmount){
app.alert("You have have entered higher amount then allowed, please enter amount less or equal to: $"+maxAmount+".");
event.value = "";}

Change 'maxAmount' as needed and adapt alert message as you see fit.

1 reply

Nesa Nurani
Community Expert
August 27, 2021

In the field properties->validation tab, did you try set  'from' and 'to' value?

Kmanning1911
New Participant
August 27, 2021

That was the first thing that I tried but it still lets you enter in numbers that are higher than the "To" field.

Nesa Nurani
Nesa NuraniCorrect answer
Community Expert
August 28, 2021

Use this as validation script:

var maxAmount = 100000;
if(event.value > maxAmount){
app.alert("You have have entered higher amount then allowed, please enter amount less or equal to: $"+maxAmount+".");
event.value = "";}

Change 'maxAmount' as needed and adapt alert message as you see fit.