Restrict decimal points in the payout amount

When vendors apply for sales proceeds to be transferred, they can also specify a decimal point.
Can I prevent them from specifying numbers after the decimal point?


Please try this PHP snippet (How to add custom code snippets - HivePress Help Center):

 function( $form ) {
  if ( isset( $form['fields']['amount'] ) ) {
   $form['fields']['amount']['type']  = 'number';
   $form['fields']['amount']['decimals']  = 0;
   $form['fields']['amount']['min_value'] = 0;

  return $form;

Please note that you may require additional customizations in the future.

1 Like

Thank you for your help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.