Skip to content

Instantly share code, notes, and snippets.

@hissy hissy/trust-form-tpl-.php

Last active Dec 27, 2015
What would you like to do?
[WordPress / Trust Form] Set the default value from $_GET
function trust_form_show_input() {
global $trust_form;
$col_name = $trust_form->get_col_name();
$validate = $trust_form->get_validate();
$config = $trust_form->get_config();
$attention = $trust_form->get_attention();
// set default value
foreach ( $col_name as $key => $value ) {
if ($value == 'イベント名') {
$_POST[$key] = esc_attr($_GET['event_name']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.