public function render() { $this->_attributes["pattern"] = "[A-Z0-9]{6}"; $this->_attributes["title"] = "6-digit hexidecimal color (e.g. #000000)"; $this->validation[] = new Validation_RegExp("/" . $this->_attributes["pattern"] . "/", "Error: The %element% field must contain a " . $this->_attributes["title"]); parent::render(); }
public function render() { ob_start(); parent::render(); $box = ob_get_contents(); ob_end_clean(); if ($this->bootstrapVersion == 3) { echo $box; } else { echo preg_replace("/(.*)(<input .*\\/>)(.*)/i", '${1}<label class="file">${2}<span class="file-custom"></span></label>${3}', $box); } }
public function render() { $this->validation[] = new Validation_Date("Error: The %element% field must match the following date format: " . $this->_attributes["title"]); parent::render(); }
public function render() { parent::render(); }
public function render() { $this->validation[] = new Validation_Url(); parent::render(); }
public function render() { //$this->validation[] = new Validation_RegExp("/" . $this->_attributes["pattern"] . "/", "Error: The %element% field must match the following date format: " . $this->_attributes["title"]); parent::render(); }
function buddyforms_form_element_multiple($form_fields, $args) { global $post; extract($args); ob_start(); echo '<div class="element_field">'; echo ' <table class="wp-list-table widefat fixed posts"> <thead> <tr> <th><span style="padding-left: 10px;">Label</span></th> <th><span style="padding-left: 10px;">Value</span></th> <th><span style="padding-left: 10px;">Default</span></th> <th class="manage-column column-author"><span style="padding-left: 10px;">Action</span></th> </tr> </thead> </table> <br> '; echo '<ul id="field_' . $field_id . '" class="element_field_sortable">'; if (!isset($buddyform['form_fields'][$field_id]['options']) && isset($buddyform['form_fields'][$field_id]['value'])) { foreach ($buddyform['form_fields'][$field_id]['value'] as $key => $value) { $buddyform['form_fields'][$field_id]['options'][$key]['label'] = $value; $buddyform['form_fields'][$field_id]['options'][$key]['value'] = $value; } } if (isset($buddyform['form_fields'][$field_id]['options'])) { $count = 1; foreach ($buddyform['form_fields'][$field_id]['options'] as $key => $option) { echo '<li class="field_item field_item_' . $field_id . '_' . $count . '">'; echo '<table class="wp-list-table widefat fixed posts"><tbody><tr><td>'; $form_element = new Element_Textbox('', "buddyforms_options[form_fields][" . $field_id . "][options][" . $key . "][label]", array('value' => $option['label'])); $form_element->render(); echo '</td><td>'; $form_element = new Element_Textbox('', "buddyforms_options[form_fields][" . $field_id . "][options][" . $key . "][value]", array('value' => $option['value'])); $form_element->render(); echo '</td><td>'; $form_element = new Element_Radio('', "buddyforms_options[form_fields][" . $field_id . "][default]", array($option['value']), array('value' => $buddyform['form_fields'][$field_id]['default'])); $form_element->render(); echo '</td><td class="manage-column column-author">'; echo '<a href="#" id="' . $field_id . '_' . $count . '" class="bf_delete_input" title="delete me">Delete</a>'; echo '</td></tr></li></tbody></table>'; $count++; } } echo ' </ul> </div> <a href="' . $field_id . '" class="button bf_add_input">+</a>'; $tmp = ob_get_clean(); return $tmp; }