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

Add an option to InputfieldPage that allows new pages to be created regardless of duplicate titles #298

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

JanRomero
Copy link
Contributor

Someone in the forums seems to have a requirement to consistently create new pages from InputfieldPage. To my surprise, this isn’t what the field actually does. This PR adds the option forceCreate to make the field behave the way I’ve always interpreteted its descriptions. It also amends the description in the page editor to clearly state that it will prefer existing pages.

https://processwire.com/talk/topic/30187-auto-numbering-and-increment-value-of-the-field-of-new-child-pages-in-context-of-parent-page-reference-field/

I would have preferred to call the setting something like “prefer existing”, but I had to flip the logic to keep the old behaviour the default for backwards compatibility (checkboxes defaulting to checked are problematic because they don’t get sent when unchecked).

Thanks!

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

Successfully merging this pull request may close these issues.

1 participant