/** * Setup the custom FES form field * * @since 2.0 * * @return void */ function edd_fes_simple_shipping_admin_field($field_id, $label = "", $values = array()) { if (!isset($values['label'])) { $values['label'] = __('Shipping', 'edd-simple-shipping'); } $values['no_css'] = true; $values['is_meta'] = true; $values['name'] = 'edd_simple_shipping'; ?> <li class="edd_simple_shipping"> <?php FES_Formbuilder_Templates::legend($values['label']); ?> <?php FES_Formbuilder_Templates::hidden_field("[{$field_id}][input_type]", 'edd_simple_shipping'); ?> <?php FES_Formbuilder_Templates::hidden_field("[{$field_id}][template]", 'edd_simple_shipping'); ?> <div class="fes-form-holder"> <?php FES_Formbuilder_Templates::common($field_id, 'edd_simple_shipping', false, $values, false, ''); ?> </div> <!-- .fes-form-holder --> </li> <?php }
/** Returns the commissions paypal to render a field for the formbuilder */ public function render_formbuilder_field($index = -2, $insert = false) { $removable = $this->can_remove_from_formbuilder(); ob_start(); ?> <li class="eddc_user_paypal"> <?php $this->legend($this->title(), $this->get_label(), $removable); ?> <?php FES_Formbuilder_Templates::hidden_field("[{$index}][template]", $this->template()); ?> <?php FES_Formbuilder_Templates::field_div($index, $this->name(), $this->characteristics, $insert); ?> <?php FES_Formbuilder_Templates::public_radio($index, $this->characteristics, $this->form_name); ?> <?php FES_Formbuilder_Templates::standard($index, $this); ?> <?php FES_Formbuilder_Templates::common_text($index, $this->characteristics); ?> </div> </li> <?php return ob_get_clean(); }