function init_form($form_id) { global $wpdb; $crf_forms = new crf_basic_fields(); $crf_fields = $wpdb->prefix . "crf_fields"; $qry1 = "select * from {$crf_fields} where Form_Id = '" . $form_id . "' order by ordering asc"; $reg1 = $wpdb->get_results($qry1); //Actualiza los campos $this->validate_form_saved($reg1); $current_user = wp_get_current_user(); //Agrega los campos basicos $this->show_basic_fields($current_user); //Agrega todos los campos del formulario foreach ($reg1 as $row1) { $key = sanitize_key($row1->Name); $value_key = $current_user->get($key); $crf_forms->crf_get_custom_form_fields($row1, $value_key); } $this->show_form_button(); include ABSPATH . '/wp-content/plugins/custom-registration-form-builder-with-submission-manager/frontendjs.php'; }