Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gw-random-fields.php: Fixed an issue with pages not getting hidden. #626

Closed
wants to merge 1 commit into from

Conversation

saifsultanc
Copy link
Contributor

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/2152014628/44086?folderId=3808239

Summary

The next page requests weren't loading. On debugging, found a recursive/repeated call to modify_target_page which on repeating back at page number 2. Added the remove_filter for that to avoid the issue.

Also confirmed that the pages that should be hidden (because no field) are in fact hidden.

Possible future improvements to look at: For a form with 8 pages and only 4 made visible, the page numbers would display something like 'Step 1 of 8' then 'Step 2 of 8' then 'Step 7 of 8' and then 'Step 8 of 8'. Could be made better with 'Step 1 of 4', then 'Step 2 of 4', then 'Step 3 of 4', and then 'Step 4 of 4'.

@spivurno
Copy link
Contributor

Curious if this PR solves the same problem?

#334

@saifsultanc
Copy link
Contributor Author

Curious if this PR solves the same problem?

#334

Sorry for not replying to this. My github notifications are definitely a mess and totally mismanaged. Yes, it does seem to do the job!

@claygriffiths
Copy link
Contributor

@saifsultanc Let's send them the code from David's draft PR until we get it merged into GP Randomizer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants