Problem with Field Type Number


Home Forums Front End PM PRO Problem with Field Type Number

This topic is: Resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30366
    David
    Participant

    Hi Shamim,
    I have a custom field type “number” labelled “Total Cost”.
    It does not have a “required” property.
    However, when I try to send a message with this field left empty I get the following error:
    Error: Total Cost is not a valid number.
    The field needs to be optional. How can I achieve this?

    $fields[‘cus_fep_textbox26’] = [
    ‘type’ => ‘number’,
    ‘where’ => array( ‘reply’, ‘shortcode-newmessage’, ‘newmessage’ ),
    ‘priority’ => 6,
    ‘label’ => ‘Total Cost’,
    ];

    Thanks for your help.

    #30410
    Shamim Hasan
    Keymaster

    Currently it check if value is numeric or not. You can set default value to 0 (zero).
    Next release i will fix it so that user can post empty value also.

    #30419
    David
    Participant

    Thanks for the clarification. Is there a fix I can use in the meantime?

    #30436
    Shamim Hasan
    Keymaster
Viewing 4 posts - 1 through 4 (of 4 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.