'min', 'type' => 'number', 'label' => __( 'Smallest allowed', '2ranq-forms' ), ); $settings['basic'][] = array( 'key' => 'max', 'type' => 'number', 'label' => __( 'Largest allowed', '2ranq-forms' ), ); $settings['advanced'][] = array( 'key' => 'step', 'type' => 'number', 'label' => __( 'Step', '2ranq-forms' ), 'help' => __( 'Use 0.01 to allow decimals.', '2ranq-forms' ), ); return $settings; } /** * Prints the field. * * @param array $field The field settings. * @param int $form_id The form id. * * @return void */ public function render( $field, $form_id ) { $describedby = $this->describedby( $field, $form_id ); $has_min = isset( $field['min'] ) && '' !== $field['min']; $has_max = isset( $field['max'] ) && '' !== $field['max']; // After a failed send the visitor's number comes back instead of a blank box. $sticky = $this->sticky_value( $field, $form_id ); ?>