AdvancedCustomFields / AdvancedCustomFields/acf

Front-end form submits itself when closing the wordpress link-edit dialogue

Open
#907 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
945
Forks
197
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
Front-end form - Pressing the update button in the Insert/edit link dialogue attempts to submit the form.

To Reproduce
Steps to reproduce the behavior:

  1. Ensure that the form is new_post and post_content field is true
  2. Add a URL to the post content field
  3. Click to edit the URL, open the Insert/edit link dialogue
  4. Press update button in the dialogue window
  5. Now the form itself will try to submit

Expected behavior
Updating the link details in the edit link dialogue triggers the acf form to attempt to submit itself

Code
acf_form(array( 'post_id' => 'new_post', 'return' => add_query_arg('saved', '1'), 'submit_value' => 'Create Post', 'field_groups' => false, 'form' => false, 'post_title' => true, 'post_content' => true, ));

Version Information:

  • WordPress Version [Latest]
  • PHP Version [7.xx]
  • ACF Version [ACF PRO 6.2.9]
  • Browser [Chrome + Firefox]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the described WordPress and ACF form configuration, then trace the front-end handling of the Insert/edit link dialogue's Update button. Done means updating link details no longer submits the surrounding ACF form; verify the behavior in Chrome and Firefox.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.