Hidden Field in Form

resolved (3 posts) (2 voices)

  1. liberty
    Member

    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

    Posted 7 months ago #
  2. Elliott
    Support

    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.

    Posted 7 months ago #
  3. liberty
    Member

    Thanks.

    We use a ticket system and must give department ID in the form to make it work.

    I'll try your suggestion.

    Posted 7 months ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme