Hello Eyedia,
Thanks for writing in!
By default, the password protected pages will display a password field. Do you want to display a custom form instead? You will have to display two forms. The first one would be the default password for people who knew the password. And then the second one will be your custom form for people to ask for the password. You might want to update your code and use this:
// An X custom password protected post/page
// =============================================================================
function x_custom_password_protected() {
global $post;
$label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
$o = '<div class="x-protect"><form class="mbn" action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" method="post">
' . __( "To view this protected post, enter the password below:" ) . '
<div><label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" maxlength="20" /></div><div><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" /></div>
</form></div>
';
$o .= '<div class="x-protect mtm">' . do_shortcode('[gravity-shortcode]') . '</div>';
return $o;
}
add_filter( 'the_password_form', 'x_custom_password_protected' );
// =============================================================================
Just make sure to replace the [gravity-shortcode]
with the correct gravity form shortcode so that it will display correctly.
Please let us know if this works out for you.