I am trying to:
Allow members to contribute to a topic using a form. The form will be on a "parent" page. The user will create a post that should link to the parent page.
Link to a page where the issue can be seen: hidden link
I expected to see:
Category fields saved in database
Instead, I got:
Input has correct values but is not saving.
<input type="hidden" id="cred_form_13364_2-hidden-2-1526306400" name="category" value="content-experience, marketing-automation-campaign-lead-management" class="wpt-form-hidden form-hidden" data-wpt-id="cred_form_13364_2_cred_form_13364_2-hidden-2-1526306400" data-wpt-name="category">
The categories are dynamic based on the page.
The same is true for the relationship field.
<input type="hidden" id="cred_form_13364_2-hidden-4-1526308025" name="@round-up-contribution.parent" value="" class="wpt-form-hidden form-hidden" data-wpt-id="cred_form_13364_2_cred_form_13364_2-hidden-4-1526308025" data-wpt-name="@round-up-contribution.parent">
Thanks. This worked for category, but not for the relationship field.
I can pass the value of the current page (parent) to the form (child) in an attempt to write to the relationship field, but this does not save as a relationship (or at least doesn't appear to).
I'm using this:
[cred_field field='@round-up-contribution.parent' value='[wpv-post-title output="sanitize"]' class='form-control' output='bootstrap']
on this page: hidden link
Oddly, even when I make a selection (and don't try to pre-pop and hide field), the parent and child are not connected, and I'm unable to select one on the edit screen.
Perhaps I'm just using the wrong value? hidden link
Hi Shane,
I tried this, but with no luck.
You can see it here: hidden link
This is the cred field I used.
[cred_field field='@round-up-contribution.parent' value='[wpv-post-id]' class='form-control' output='bootstrap']
I have not hidden it and when I test it, I don't make any selection changes.
Any other hints?
Hi Shane,
Yes. I mentioned it before that:
"Oddly, even when I make a selection (and don't try to pre-pop and hide field), the parent and child are not connected, and I'm unable to select one on the edit screen."
I can select the field, but it's not saving correctly or is not making the connection between the child and parent.
Thanks,
Lana
Ok. I delete the old form and created a new one using the same html/shortcodes. The form submits, but the category and relationship fields aren't passing.