Hi,
Love the [contactform] short code. However, I need to have a hidden field in the form, how do I do that?
'
<input type="hidden" name="deptid" value="5">
'
Thanks
(3 posts)
(2 voices)
Hi,
Love the [contactform] short code. However, I need to have a hidden field in the form, how do I do that?
'
<input type="hidden" name="deptid" value="5">
'
Thanks
Hello liberty,
What is this hidden field for? Are you using some kind of plugin?
You might be able to add it to the end of line 60 in /wp-content/themes/[your_theme]/lib/shortcodes/16-contact.php,
$out .= '<form action="' . esc_url_raw( $url ) . '" method="post">';
By changing it like this,
$out .= '<form action="' . esc_url_raw( $url ) . '" method="post"><input type = "hidden" name = "deptid" value = "5">';
But just adding that will not have any effect unless your using a plugin, etc etc.
Thanks.
We use a ticket system and must give department ID in the form to make it work.
I'll try your suggestion.
You must log in to post.