Body: <p>Using Formbuilder, is it possible to delete an existing relationship (not simply disabling / deactivate it)?</p>
  <p>Use case :</p>
  <ul>
  <li>in a form, a parent can edit his own data, and the data of his children (individuals having &quot;child of&quot; relationship</li>
  <li>let's imagine that by mistake, one of the related children is in fact NOT a child of the current user/ parent.</li>
  <li>parents would probably try to delete all the fields (name, etc...) of that children (and we want to avoid that !)
  The cleanest solution would be that the parent could &quot;unlink&quot; / delete the relationship with this child Individual</li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-20T18:14:44.493Z
Comments.Text: Have you tried exposing the "Relationship Type" field to the form? Deselecting that might delete the relationship.
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-21T15:44:14.990Z
Comments.Text: Thx ! It works partially. It's ok with a simple test, logged in as admin  : one parent (current user), one child. I expose the "Current relationship" field, and the "Relationship type". It is then possible to delete the selected "current relationship".
  Problems in the following comment
Comments.UserDisplayName: stackexchange user
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-21T15:44:26.577Z
Comments.Text: Problems : **1)** how to autofill the "current relationship" field ? **2)** I have marked the relationship as "repeating" / "multiple", to test one parent with several children, but I get only one "current relationship" field **3)** Permissions: sending mailing with afform token to a parent, all tabs in open access, there is no result in "existing relation" :(
Comments.UserDisplayName: stackexchange user
Tags: <relationships><formbuilder>
Title: Formbuilder : is it possible to delete a relationship?
ThreadText: # Formbuilder : is it possible to delete a relationship?
  
  (Asked by: username_0 on 2023-08-18)
  
  Using Formbuilder, is it possible to delete an existing relationship (not simply disabling / deactivate it)?
  
  Use case :
  
  * in a form, a parent can edit his own data, and the data of his children (individuals having "child of" relationship
  * let's imagine that by mistake, one of the related children is in fact NOT a child of the current user/ parent.
  * parents would probably try to delete all the fields (name, etc...) of that children (and we want to avoid that !)
    The cleanest solution would be that the parent could "unlink" / delete the relationship with this child Individual
  
  **Tags:** relationships, formbuilder
  
  > **Comments:**
  > **username_1**: Have you tried exposing the "Relationship Type" field to the form? Deselecting that might delete the relationship.  
  > **username_0**: Thx ! It works partially. It's ok with a simple test, logged in as admin  : one parent (current user), one child. I expose the "Current relationship" field, and the "Relationship type". It is then possible to delete the selected "current relationship". Problems in the following comment  
  > **username_0**: Problems : **1)** how to autofill the "current relationship" field ? **2)** I have marked the relationship as "repeating" / "multiple", to test one parent with several children, but I get only one "current relationship" field **3)** Permissions: sending mailing with afform token to a parent, all tabs in open access, there is no result in "existing relation" :(  
  
  ---
  
  ## 0 answers
  
  