WordPress.org

Ready to get started?Download WordPress

Forums

Simple Fields
suggestion: add a "unique group class" to input fieldss (1 post)

  1. roberto.c
    Member
    Posted 2 years ago #

    Hi,it should be useful, in order to style some group of input fields, a unique group class.
    Example:

    FILE: functions_post.php

    FUNCTION:simple_fields_meta_box_output_one_field_group

    after "foreach ($current_field_group["fields"] as $field) {"

    i have added:
    $field_unique_class = "simple_fields_fieldgroups_input_{$field_group_id}_{$field_id}";

    Then after } elseif ("text" == $field["type"]) {

    i have modified

    echo "<input class='text' name='$field_name' id='$field_unique_id' value='$text_value_esc' />";

    in

    echo "<input class='text $field_unique_class' name='$field_name' id='$field_unique_id' value='$text_value_esc' />";

    Now, using this in your css file: input.text.simple_fields_fieldgroups_input_4_4
    it is easy to give a style to a specific input fields (second id 4) inside a repeatable group (first id 4).

    It should be useful to insert this in future releases, i think.

    :)

    http://wordpress.org/extend/plugins/simple-fields/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic