displaying a zero with sprintf %s

81 Views Asked by At

I'm working over a wordpress theme which has this code in a php form.

    $other_fields = array(
        __( 'Budget', APP_TD ) => sprintf( '%s (%s)', appthemes_get_price( $project->_hrb_budget_price, $project->_hrb_budget_currency ), $budget_text ),
        __( 'Location', APP_TD ) => ( 'remote' != $project->_hrb_location_type  ? $project->_hrb_location : __( 'Remote', APP_TD ) ),
        __( 'Files', APP_TD ) => $files,
    );

In the front end if I type 0.01 in the budget box it comes up with an error saying 'please insert a valid budget price'.

The box won't allow me to start the price with a 0?

I want to allow Bitcoin prices in the box so want the user to be able to type in i.e 0.1 for example.

Is there anyway around this?

Thanks!

0

There are 0 best solutions below