'max_length', 'type' => 'number', 'label' => __( 'Character limit', '2ranq-forms' ), 'help' => __( 'Leave empty for no limit.', '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 ); // After a failed send the visitor's text comes back instead of a blank box. $sticky = $this->sticky_value( $field, $form_id ); ?>
wrapper_data( $field ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- already escaped in wrapper_data().?>> render_label( $field, $form_id ); ?> value="" placeholder="" maxlength="" aria-describedby="" /> render_description( $field, $form_id ); ?>
0 && mb_strlen( (string) $value ) > $max ) { return sprintf( /* translators: %d: maximum number of characters. */ __( 'This field is limited to %d characters.', '2ranq-forms' ), $max ); } return ''; } }