LLMS_Form_Field::prepare_wrapper_classes()

Prepare CSS wrapper classes for the field.


Return Return

(void)


Top ↑

Source Source

File: includes/forms/class-llms-form-field.php

976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
protected function prepare_wrapper_classes() {
 
    $defaults = array();
 
    // Base field class.
    $defaults[] = 'llms-form-field';
 
    // Add class for the field type.
    $defaults[] = sprintf( 'type-%s', $this->settings['type'] );
 
    if ( $this->is_input_group() ) {
        $defaults[] = 'is-group';
    }
 
    // Add columns classes.
    $defaults[] = sprintf( 'llms-cols-%d', $this->settings['columns'] );
    if ( $this->settings['last_column'] ) {
        $defaults[] = 'llms-cols-last';
    }
 
    // If required, add a class.
    if ( $this->settings['required'] ) {
        $defaults[] = 'llms-is-required';
    }
 
    $this->settings['wrapper_classes'] = $this->classes_ensure_array(
        $this->settings['wrapper_classes'],
        $defaults
    );
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.