A combination of PHP and JS will do it.
-
Have your page listen for the presence of
gform_submit
which Gravity Forms includes as a hidden field on all forms by default.if(!empty($_POST['gform_submit'])) { // now here comes your javascript }
-
For the JS, set modal-state checked. This way on page load, if the form has been submitted, the JS will trigger the CSS which makes the modal visible.
<script type="text/javascript"> jQuery(document).ready(function(){ jQuery("#modal-1").prop("checked", true); }); </script>
You can do it in vanilla JS as well, but I’m assuming if you’re using modals and the like you probably have jQuery available.
Not sure what your use case is, but it would be wise to check the accessibility of your solution to screen readers, keyboard users, etc.
Related Posts:
- Modal dialog under the backdrop
- Making a
- How to change the color of an svg element?
- How to implement max-font-size?
- @Media min-width & max-width
- How do I center this form in css?
- How can I replace text with CSS?
- Bootstrap 4, How do I center-align a button?
- How do I horizontally center a span element inside a div
- What does an asterisk (*) do in a CSS selector?
- height style property doesn’t work in div elements
- Text not wrapping inside a div element
- combined multiple classes into one css rule
- CSS Outside Border
- CSS not working in Chrome
- Rainbow gradient on text in CSS
- CSS3 opacity gradient?
- use multiple css filters at the same time?
- What would be the best method to code heading/title for ul or ol, Like we have caption in table?
- How can I make my header image properly responsive?
- CSS fixed width in a span
- Adding border to CSS triangle [duplicate]
- Remove wp_add_inline_style
- WordPress Register Style Called Incorrectly
- wp_enqueue_script + how to load JS or CSS in one URL merge call?
- Duplicate and alter sidebar for Twenty Eleven
- How to dequeue styles coming from plugins?
- How to set different font family based on text language?
- How to exclude certain code from style.css? [closed]
- Need Help Figuring Out Admin Menu Hover Styling Class
- How to decrease picture size
- whats happening with my index page?
- How do I add an indicator to my .menu-item if it contains a .sub-menu?
- Change via CSS the color of social menu icons
- Header’s CSS doesn’t work in Chrome and Opera – any ideas how to fix it?
- @media in bluehost is being commented out [closed]
- Twenty Fifteen : Wider right column for the content
- Moving button on Online Consulting theme
- css file status 403
- How can I get the search form to be selected automatically?
- Advanced: understanding wp_add_inline_style function
- Hide Image On WordPress On Single Page [closed]
- Faster fonts on mobile
- WordPress code editor messed up my code!
- Ordering stylesheet above using functions.php
- How to change “““ to “““?
- How to remove parent style.css from the header
- How to remove the gap on right side of webpage (using Bootstrap with WordPress)?
- enqueing Javascript and CSS
- Acessing HTML element with no specific tag on it [closed]
- Order of WP page load (including widgets, php, plugins, media, templates, and CSS) [duplicate]
- With over a page of content the footer remains where the bottom of the screen was at top scroll
- CSS is not loaded on mobile devices
- How to add/insert a class to a sidebar in single.php?
- Fixed height of the_content()
- How can I add inline CSS for each image?
- Creating a second menu on Twenty Eleven aligned right from the first
- Customizing WP-syntax to get custom colors
- I have html form and need to make it work in text editor on template. Only problem is it has .sccs styling file
- 2 css files? Theme css file gets override by another css file that I can not edit
- How to insert the current user’s role into the body class in the admin backend
- underscores theme – sass folder structure vs smacss
- Need to make sidebar responsive only when screen width is greater than 1024px
- Does anyone know how to make text fade in when scrolling down, that doesn’t require any plug-ins? [duplicate]
- Unused CSS in WordPress Plugins
- I have text on a banner on my wordpress site and I am unable to get rid of it? Would appreciate any help or advice :-)
- How to change specific menu tab from left to right in My Home Theme?
- Admin bar default color scheme for nonregistered/nonlogged users
- Lines of CSS only being delivered while logged in
- Twenty Fourteen: Unsticky header after making header bigger
- How to display javascript banner in website header?
- Make different border color gallery items
- Loading css files conditionally useful?
- Sidebar at bottom however I have completely replaced theme folder back to original code
- Site not 100% responsive
- Dropdown menu’s fighting with each other [closed]
- Customizer: CSS changes not persistent
- Move both sidebars more to their sides [closed]
- Scale An Image Thumbnail
- Which hook to use to add notification message at beginning of my
- single.php doesn’t getting style
- Theme looks ugly – FOUC – stylesheets loaded in footer
- How to make widgetized footer styles be inherited from body?
- custom css in admin panel by user id
- How to customize a theme’s navigation menu with css
- Site layout problems when logged in due to admin bar
- Add “sub-nav” class to a sub menu parent item
- Current Post/Page Ancestor, CSS
- How to target only one element if more elements share the same CSS class
- Custom css code in wordpress [closed]
- Using Easy Google Fonts correctly and Droid Sans on Max OS X [closed]
- remove white overlay [closed]
- Why doesn’t media(max-width) work on h2 title?
- How to use WordPress 3.8 back-end CSS in front-end?
- can i custom rendered content from API?
- How to include Elementor CSS in custom php file [closed]
- How to add CSS to WordPress
- How to add arbitrary custom CSS to a WordPress Block Theme using Site Editor?
- Wrap post titles containing slashes on narrow viewports
- Import css file from node_modules using @wordpress/scripts