1
0
-1

Is it possible to use a spinner to enter data into a text or a decimal field?

  1. Ben Warner

    Don't understand the question.

CommentAdd your comment...

1 answer

  1.  
    1
    0
    -1

    If you mean a numeric input field, you can select Number type in the Properties tab:

    If you wanted to constrain the number range, you could include a Load rule in Form Options like:

       $('#textField').prop({min:1,max:100,value:45});

    The control itself does not show up/down arrows, nor does it prevent manual entry of out-of-range values.  That might need a Jira ticket to resolve.

    HTML input type=number controls are also not supported in Internet Explorer.

    1. Chantal Thomas

      Thanks Bill.

      What I wanted to appear on a numeric field, were up/down arrows.

    2. Bill Frost

      You can get text fields to look like this, with some effort, that also works in IE:

       

      That styling required a few different steps:

      1. Include the JQuery UI JavaScript library in the Form: http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js
      2. Create a Form Load rule:
                   $('#textField').prop({min:1,max:100,value:45}).spinner();
      3. Create a new shared style and add custom css:
            .ui-spinner-up { float:right; margin-top: -32px;  } 

          .ui-spinner-down { float:right; margin-top: -20px; }

      This is only really for a test... you would need to be very careful that the JQuery UI inclusion doesn't break existing behavior.  It might also be problematic for multiple fields on the same row.

       

    CommentAdd your comment...