name = __( 'Section Break', 'weforms' );
$this->input_type = 'section_break';
$this->icon = 'columns';
}
/**
* Render the text field
*
* @param array $field_settings
* @param int $form_id
*
* @return void
*/
public function render( $field_settings, $form_id ) {
$description = isset( $field_settings['description'] ) ? $field_settings['description'] : '';
$name = isset( $field_settings['name'] ) ? $field_settings['name'] : ''; ?>
print_list_attributes( $field_settings ); ?>>
'label',
'title' => __( 'Title', 'weforms' ),
'type' => 'text',
'section' => 'basic',
'priority' => 10,
'help_text' => __( 'Title of the section', 'weforms' ),
],
[
'name' => 'name',
'title' => __( 'Meta Key', 'weforms' ),
'type' => 'text-meta',
'section' => 'basic',
'priority' => 11,
'help_text' => __( 'Name of the meta key this field will save to', 'weforms' ),
],
[
'name' => 'description',
'title' => __( 'Description', 'weforms' ),
'type' => 'textarea',
'section' => 'basic',
'priority' => 12,
'help_text' => __( 'Some details text about the section', 'weforms' ),
],
];
return $options;
}
/**
* Get the field props
*
* @return array
*/
public function get_field_props() {
$props = [
'template' => $this->get_type(),
'label' => $this->get_name(),
'description' => __( 'Some description about this section', 'weforms' ),
'id' => 0,
'is_new' => true,
'wpuf_cond' => $this->default_conditional_prop(),
];
return $props;
}
}