WordPress.org

Ready to get started?Download WordPress

Forums

Calculated Fields Form
[resolved] How to limit input to 2 decimal places in non calculating user field? (7 posts)

  1. anefarious1
    Member
    Posted 7 months ago #

    Is there a way to use prec for when people enter data into a form? I'd like to limit intervals to not less than 1 cent (.01) as the lowest possible input value. I don't want an error but hopefully the cursor just won't advance visually. thanks

    http://wordpress.org/plugins/calculated-fields-form/

  2. codepeople
    Member
    Plugin Author

    Posted 7 months ago #

    Hi,

    In the numeric fields is possible define a min value, use 0.01 as min attribute.

  3. anefarious1
    Member
    Posted 7 months ago #

    When you say numeric fields do you mean in the "set equation" field? I don't see a field labeled "numeric"

    Also, how to use the min value in this case?

    min(fieldnameXX)0.01 is how I would do it? Sorry to trouble you.

  4. anefarious1
    Member
    Posted 7 months ago #

    Turns out the field I used was a calculated field which is why I couldn't find what you were talking about. I see it now. All set. Thanks

  5. anefarious1
    Member
    Posted 7 months ago #

    I changed to the proper field. However, if I use 0.01 for the min value it just creates a floating tooltip and doesn't actually enforce the rule. Is there any way to not have the floating tooltip? Is it possible to use the prec feature for limiting a user entry to 2 decimal places? Example: 10.62 is OK but not 10.627
    Thanks

  6. anefarious1
    Member
    Posted 7 months ago #

    Is that possible, to use prec for limiting user input to 2 decimal places, if I switch back to the calculated field? If so how? Doesn't seem like an equation but may work? Sorry forgot to include this in previous reply.

  7. anefarious1
    Member
    Posted 7 months ago #

    hmmm I guess there is no way to do it. Thanks anyway.

Reply

You must log in to post.

About this Plugin

About this Topic