Jump to content
  • 0

Search within range





I have a search and report based on a table that has a column for "minimum" and a column for "maximum".  I can put both of the fields on the "Configure Search Fields" with the Minimum having a comparison type of "Less Than or Equal" and the Maximum having a comparison of "Greater Than or Equal" so that the results are within the range.  However, that requires the user to basically enter the amount in both fields.  Is there a better way to do this so the user only has to enter the amount once?  I'm hoping I can turn one of the fields into a hidden element that automatically has the value of the other field, but I have not been able to get that going.  Thanks in advance!



Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @Scott17,

You can use simple Javascript code to copy the value from one field into another. 

You may use this snippet of code as an example:


function copy()
var date1 = document.getElementById("ValueX_Y").value;  // X_Y values based on the layout of your fields

document.getElementById("ValueX_Y").value = date1; // X_Y values based on the layout of your fields


var date1 = document.getElementById("ValueX_Y").onchange=concatenate;


          -   ValueX_Y
          -   X is the form element order, which starts at 1 and increments based on the order of the element in the form.
          -   Y is the criteria. It starts at 1 and increments based on the criteria order. It is always 1 if the field has no extra criteria.

You may refer to the following topic which explains how to refer to Caspio Form elements:


Hope this helps.





Link to comment
Share on other sites

  • 0

Hi Vitalikssssss

I appreciate the help, although, I am not sure where I should even be adding this JS code.  I think it should go on the "Configure Search Fields" on the element that I want to be matching.  However, I do not see a place to put the code anywhere.  Can you provide some additional clarification on that?

Thank you,


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...