whenever I paste the shortcode in the page editor the form posts
automatically and redirects to /wp-admin/admin-post.php with a blank
screen
I don’t know what editor is that (🤔), and I’m not sure if this will fix the above issue, but I noticed your function is using wp_nonce_field()
which by default displays/echo
the output, so because you’re doing $formHtml .= wp_nonce_field(...)
, then you need to disable the echo because otherwise you’d run into issues like invalid REST API’s JSON response which then causes the block/Gutenberg editor to fail in saving the post.
// set the 4th parameter to false
$formHtml .= wp_nonce_field('get_job_card', 'get_job_card_nonce', true, false);
Related Posts:
- Custom form, shortcode, and submit handler
- Simple contact form with field validation
- Raw output (preventing wpautop)
- other shortcodes in Contact form 7 MAILS [closed]
- How to add and submit input fields using a shortcode?
- Form Shortcode not saving data to WP database
- Getting error on submitting form using Ajax with shortcode
- Modifying the wordpress login page and then referencing it with a shortcode problem
- Form processing: How to process form before output and access data from shortcode
- Create shortcode for each form field in contact form 7
- How can I use a plugin shortcode inside of a html form?
- Send Mail with link to current_user
- Contact form code not working. Need help!
- How to display a page dependent on a url parameter supplied by a form/button page?
- WordPress shortcode select option not working [closed]
- Custom shortcode being executed when saving page in wp-admin
- Shortcode outputs at the top of the_content
- Escaping quotes from shortcode attributes
- Short code to display a loop
- How can I just get content inside a shortcode or just outside
- Custom Shortcode AJAX 400 Bad Request
- WordPress core responsive video not working with shortcode
- Wraping $content into link with shortcodes
- Remove empty p-Tags in Shortcode content before non p-Tags
- What is a short code?
- Using do_shortcode with variables?
- Remove hyperlink on gallery shortcode
- Wrap shortcode inside custom block
- Instagram URL is converted into oEmbed
- Shortcode with no attribute but has value
- Remove wpautop from specific shortcodes only
- unwanted P tags in shortcode, delay wpautop not working
- Shortcodes and a list of IDs?
- Shortcode adding plugin output before post, instead of inline [duplicate]
- How to build a shortcode which can insert a query string into a DB table
- What is the Correct way to pass parameters in function
- Visual Composer integration [closed]
- How to Modify WordPress Default Image Gallery Shortcode
- no content after shortcode
- Button Shortcode
- Place a URL parameter value inside a WordPress short code
- Shortcodes in excerpts returning empty string
- Scripts for shortcode: concatenate or load separately? [closed]
- Print shortcode in defined area
- WordPress shortcodes are not working
- How to use/enable Pagination?
- Wrap Shortcodes and wpautop
- Placing tags on wordpress visual editor using shortcodes
- Shortcode called twice
- Favorite websites with shortened hyperlinks
- Best way to find all shortcodes that come with WordPress
- Using Variables in Shortcodes
- Default Attributes in Shortcode Not Working
- Replacement for gallery_shortcode function not taking all attributes
- Shortcode syntax errors
- Passing variable in nested shortcodes
- How to transform WordPress user role code to WP shortcode?
- Shortcode don’t work in custom option field, any solution?
- Does short-code slow down my WordPress site?
- redirect if shortcode exists
- Position shortcode off [duplicate]
- ob_get_clean(); doesn’t return $value in shortcode?
- How to Get Shortcode in Excerpt to follow Document Flow
- Cant fix this Warning: Invalid argument supplied for foreach() in [closed]
- Different ID in every shortcode
- Parsing a shortcode through an author meta textfield
- Adding YouTube button to TinyMCE editor
- How to find out what handler is registered to a shortcode
- Custom Fields – Boolean Display of True/False to Yes/No
- How to display NextGEN gallery in templates?
- Twitter bootstrap tabs
- jQuery Tabs in Shortcode API
- Build Clickable Link Using Multiple Attributes
- Echo Extra Shortcode HTML to wp_foot
- Disable wpautop on Shortcode attributes
- remove shortcode pagination for specific url referrer
- Third-Party API – PHP Fatal Errors Paired with http_request_failed / cURL error 28
- Shortcode PHP file for two conditions passed when do shortcode
- Using within a shortcode
- How do I point bloginfo(‘stylesheet_directory’) to my parent theme?
- Add audio file to post using custom term meta field as link [closed]
- Display tags cloud from a specific category ID with a shortcode
- How to list child pages with excerpts, e.g. [child-pages depth=”1″ excerpt=”1″]
- Add a shortcode in woo-function.php
- Woocommerce products shortcode specific order
- Video shortcode outside WordPress not working with IE and mediaelement’s Flash fallback
- Display title of child pages in shortcode
- Output html source tags inside shortcode
- Clarify: Enqueueing scripts within shortcode only loads in footer?
- What is the best way to include a template file within a shortcode?
- Shortcode templates
- Create plugin/function to catch XML-data via Shortcode
- Why My slider shortcode display above header
- Does anyone recognize shortcode ig_special_heading?
- Shortcode conversion to hrml when post is published
- Shotcode error on functions
- Shortcode for displaying the user’s first name?
- Can I prevent wordpress adding and tags to autoembeds
- Shortcode – Display inline icon before text [closed]
- Redirect loop upon installation of my plugin