twomice / com.joineryhq.groupreg

Other
0 stars 1 forks source link

Fields on the Profile for Additional Participants are not reset when removing the selected Contact from the "Select a person" field #20

Closed cristina-p closed 9 months ago

cristina-p commented 10 months ago

When registering Additional Participants, if there is contact selected on the "Select a person" drop-down field and we click on the "x" to remove that contact, the fields included on the Profile for Additional Participants are not reset and it keeps the contact previously selected.

twomice commented 10 months ago

If I understand you correctly, this is "as designed" behavior:

  1. Select a related contact and observe that the form fields are populated -- and that First Name and Last Name fields are locked from editing (along the same line of rationale as the No Overwrite extension: this aims to avoid people changing renaming contact "Bob Smith" to "Alice Jones" )
  2. Click the X to remove the selection in the Related Contact list, and observe that pre-populated field remain populated, and that First and Last name fields are unlocked for editing. (Since this is no longer an existing contact, we should allow any necessary change of name fields, so these fields are unlocked.)

Like so: gifmaker

If you think there's rationale for clearing the pre-populated fields in this situation, I must admit I agree, that seems like a valid bit of functionality.

If you're interested in sponsoring this as an improvement in the extension, I'm certainly open to it.

To prevent surprises on sites where this extension is installed and the existing behavior may be expected, I'd want to have this as a configurable option; so that site admins could specify which behavior they prefer.

cristina-p commented 9 months ago

Thanks for the explanation.

I have tested that when removing the selected contact from the Related Contact list by clicking X, if the email address is unchanged the contact that was previously selected is updated, instead of creating a new Contact. Is it the expected behaviour?

I also raised an issue (#19) regarding the opposite behaviour: when you have selected an existing contact from the list of Related Contacts the extension creates a new Contact when updating their email address, instead of updating the email address of the selected existing contact.

twomice commented 9 months ago

I have tested that when removing the selected contact from the Related Contact list by clicking X, if the email address is unchanged the contact that was previously selected is updated, instead of creating a new Contact. Is it the expected behaviour?

@cristina-p Thanks for reporting this. To help me keep everything organized (for my own workflow and for others who may come to this issue queue later), would you please create a new ticket for that specific issue. (The current ticket, per the title, relates to pre-filled values for form fields.)