I have a cred field in a cred form, that is addressing a relationship:
[cred_field field='@protokoll-festvertrag.parent' class='form-control' output='bootstrap' select_text='--- not set ---' required='false']
The relationship is already set when loading the form/page, so there is a value in the field available after page loaded.
I want to remove the value and reset it to the default placeholder. This is just working by manually clicking the "x", however it is not working using "value" or "urlparam" attributes in the cred_field shortcode.
Could you assist on this? How can I reset the value to placeholder/disconnect the relationship? I need to have it done right after page was loaded. I simply want to click on Submit form to have the relationship disconnected.
Some more background info:
I have many of those forms on one page and want to reset hundreds of relations. I have seen that select2 is being used, however was not able to form the javascript accordingly. Maybe there is another solution less complicated.
That adds a URL parameter to the page URL so that when you land on the page the parent post select field recognises the URL parameter and sets the value accordingly.
Before looking in to this any further, am I understanding correctly that this is the scenario in your case, and that you want to unset the specified parent.
In which case I might ask, why not change how you link to the page, so that you don't specify the parent? (You'll note that is done with the parent_link attribute of the cred_child_link_form shortcode.)
sorry for not adding this:
I am talking about editing a form, it is not a new form that creates new posts. That is why the cred field is already pre populated and I want to delete the population to remove the relationship (so, unsetting the specified parent).