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

Combo subfield with showIf condition based on a parent field is not saved #2049

Open
Remco646 opened this issue Feb 18, 2025 · 0 comments
Open

Comments

@Remco646
Copy link

Short description of the issue

A Combo field subfield with a showIf condition referencing a field outside of the Combo field is displayed correctly in the admin UI but is not saved when the page is saved.
The following error is displayed:
InputfieldForm: Warning ('showIf' from 'subfield'): dependency field 'toggle_field' is not present in this form.

Expected behavior

  • The Combo subfield should be shown or hidden correctly in the admin UI based on the showIf condition.
  • The subfield value should be saved correctly when the page is saved.

Actual behavior

  • The Combo subfield visibility updates correctly when editing the page.
  • When saving the page, the value of the subfield is not saved.

Steps to reproduce the issue

  1. Create a checkbox field named toggle_field
  2. Create a Combo field named combo_field with the following subfield:
    • subfield (Text field, with showIf="toggle_field=1")
  3. Create a template named test_template and assign these fields:
    • toggle_field (Checkbox)
    • combo_field (Combo field)
  4. Create a page using test_template.
  5. Edit the page in the admin UI:
    • Check toggle_field: subfield appears.
    • Enter a value into subfield.
    • Save the page.
    • The value entered in subfield is lost after saving and an error is shown.

Setup/Environment

  • ProcessWire version: 3.0.244
  • ProFields: Combo version: 0.1.7
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

No branches or pull requests

1 participant