$attributes Block attributes. * @since 0.0.2 */ public function __construct( $attributes ) { $this->set_properties( $attributes ); $this->set_input_label( __( 'Textarea', 'sureforms' ) ); $this->set_error_msg( $attributes, 'srfm_textarea_block_required_text' ); $this->slug = 'textarea'; $this->max_length = isset( $attributes['maxLength'] ) ? $attributes['maxLength'] : ''; $this->rows = isset( $attributes['rows'] ) ? $attributes['rows'] : ''; // html attributes. $this->max_length_attr = $this->max_length ? ' maxLength="' . $this->max_length . '" ' : ''; $this->rows_attr = $this->rows ? ' rows="' . $this->rows . '" ' : ''; $this->max_length_html = '' !== $this->max_length ? '0/' . $this->max_length : ''; $this->set_unique_slug(); $this->set_field_name( $this->unique_slug ); $this->set_markup_properties( $this->input_label ); $this->set_aria_described_by(); $this->set_label_as_placeholder( $this->input_label ); } /** * Render the sureforms textarea classic styling * * @since 0.0.2 * @return string|boolean */ public function markup() { ob_start(); ?>
label_markup ); ?> help_markup ); ?>
error_msg_markup ); ?>