We have a RFG for users to add children info to their profiles. the children info is added via a front end form
however the way it is set at the moment is that users have to select their profile manually from a dropdown list in order for the RFG to be linked to the right user and thus profile.
I would like to make the form so that the current logged in user (the creater of the RFG) to be automatically set as "author" of the RFG
the way we currently have it with the manual selection is using
[cred_field field='@informatie-kinderen.parent' class='form-control' output='bootstrap' select_text='selecteer je profiel' author='$current']
so instead of manually selecting their own username from the dropdown to properly link the RFG to the corresponding user
I want to set the username automatically to properly link the RFG to the corresponding user
The [cred_field field='@informatie-kinderen.parent' class='form-control' output='bootstrap' select_text='selecteer je profiel' author='$current'] field using the author = '$current' wont auto select the post of the current author. What it does is that it will only display in the dropdown posts of that current author for them to select.
There is no option to have the value preselected like this unless you provide the ID of the post that is to be preselected in the URL.
Lets say you have a button on the Parent Post for this RFG and you have a button that says "Add new RFG" this way we can pass the ID of the parent post into the form when you click to the page and it will auto select he correct parent post for the RFG.
ok so I have tried it the way you described, but the RFG form/field still does not seem to grab the data from the URL.
it is still needed to click the dropdown and select the profile to which the RFG must be linked as you can see in the screenshot.
I would like it so that visitors dont have to click that dropdown and select their account in there.
I have tried is also with adding a value="$current" and some other combinations but that didn't work either.