Last active
December 27, 2015 03:39
-
-
Save hissy/7261267 to your computer and use it in GitHub Desktop.
[WordPress / Trust Form] Set the default value from $_GET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
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