I have used the code in the custom CSS
add_filter(
'gform_submit_button_10'
,
'__return_false'
);
to remove the Submit Button but th buttons is still there. Any ideas?
I have used the code in the custom CSS
add_filter(
'gform_submit_button_10'
,
'__return_false'
);
to remove the Submit Button but th buttons is still there. Any ideas?
Hi Jason,
The code you have there is PHP but not CSS and that filter don’t actually exist. If you want to hide the Submit button with CSS, then you can try this;
#gform_submit_button_10 {
display: none;
}
I hope this helps.
Best,
Thanks I’ll try that!
Hi, I have tried that and put that in the Custom CSS stryling but the submit button is still proesent. The form ID is 30 so I used 30 in the script:
#gform_submit_button_30 {
display: none;
}
Hi Jason. You can use CSS or PHP for this. If the CSS is not working, it’s probably not specific enough. Your first example was PHP code and that filter should still work:
For you, with form 30, it would look like this:
add_filter( 'gform_submit_button_30', '__return_false' );
That is PHP code which can be added to your theme functions.php file, or you can use a plugin such as this one to keep the code separate from the theme: Code Snippets – WordPress plugin | WordPress.org
If you want to use the CSS instead, try this:
#gform_submit_button_30 {
display: none!important;
}
You can add this CSS to your theme (or child theme) stylesheet or via the Appearance Customizer (Appearance > Customize > Additional CSS). Let us know how it turns out.
Generate a nice long password-style string, and add conditional logic on your form button in form settings. Condition should be where some field value is the same as your password-style string.
e.g. Name (first) “is” hCkGNKvWuY73QQrIpbyS5RKCTWSEpiij
Button will not show unless that field has that value. Someone could dig through the page source to find it, and use it, but call that an easter egg and give them a prize