Skip Navigation

[Closed] Using Form to add RFG to Custom Post

This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 14 replies, has 2 voices.

Last updated by Shane 3 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1713593

Hi

Added the line to link to parent ID for Form adding new RFG in custom post, but cannot get the link to work.
<div class="form-group" style= "display:none;">
<label>Opportunity</label>
[cred_field field='@volunteerv2.parent' class='form-control' output='bootstrap' value ='[wpv-post-id]' select_text='--- not set ---' required='true']
</div>

#1713851

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ian,

Thank you for getting in touch.

From your post you want to automatically have your field set to the Parent of the RFG correct?

Is the form on the same page that the parent is on ?

I also see here that you're hiding the display of the field.

Please let me know and we can take it from there.

Thanks,
Shane

#1713951

Hi there - That's spot on.

I am displaying the form on a View that displays the parent posts in the loop.

I have pre-populated values on a range of RFG fields above this line and ultimately just want the submit button visible. They are posting to the database, just not linking to the parent post.

#1714151

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ian,

Based on what you have you should be able to do it.

Would you mind allowing me to have admin access to the website so that I can have a look at this in further details.

I need to check why the [wpv-post-id] shortcode isn't returning the ID for the current page. I've enabled the private fields for your next response.

Please also share with me a page where I can test this out.

Thanks.
Shane

#1714919

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ian,

Thank you for the credentials, however they don't seem to be working.

Can you check on this for me and let me know if they work for you ?

Thanks,
Shane

#1714925

Hi - I have updated the password, so the original credentials in #1714183 should now work.

#1715029

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ian,

Thank you. I was able to test this out.

Problem is that you're unable to set the parent information from the view itself. I did a sample test here as a proof of concept
hidden link

As you can see the form gets the ID of the current page and correctly sets the parent information.

In your view I know there are issues with forms being added to a view loop so I doubt this setup will work.

I would suggest putting the volunteer form on the opportunity page itself and allow the users to click to the Opportunity single page from the listings page.

Thanks,
Shane

#1715065

I don't really think that will work. We wanted a list that users could just look down and click on the ones they want to volunteer for

#1715173

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ian,

This will pose an issue given that it doesn't work. What I can do is to perform some replication steps of the issue on my end and see if the is replicable.

If it is then I will escalate to our 2nd tier supporters for further checks and forwarding to our dev team. If a fix is to be provided I won't be able to give an estimate as this can take some time.

Let me know what you think of this. For now the alternative will need to be used.

Thanks,
Shane

#1715193

I'd appreciate that, as it would be great to have this level of functionality. I expected it to work that way, so was quite surprised it is referring to the main post rather that the post in the view loop.

Thanks

#1715231

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-07-22 at 2.16.56 PM.png
Screenshot 2020-07-22 at 2.15.54 PM.png

Hi Ian,

I did a check on this and it works fine in my testing. See screenshot

Can you completely remake your form as a test. Leave the form in its default configuration and just add the [wpv-post-id] shortcode to the parent field like my screenshot

Try it like this and then let me know if the issue still remains. If it does then its perhaps an issue specific to your actual website.

Thanks,
Shane

#1715283

I've managed to find the issue. It is when you are adding the form using the Block Editor and using the Fields and Text container and then adding the form from there.

If you do it outside the block editor the form works.

So don't know if this is a bug?

#1715337

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ian,

It can perhaps be something to be looked at by the team, however the correct way to add the form is to use the forms block when using our the gutenburg editor.

Thanks,
Shane

#1715349

If I do it either through the Form Block or the Fields & Text container, then the post ID stops populating.

#1715351

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ian,

I believe this would be something unique to your end only. Have you tried to disable all the non-toolset plugins and checking again ?

I've tried on my end with the block builder and the items load up fine. I'm not experiencing any issues.

If after testing with the plugins disabled and it still doesn't work I will need a copy of your website to perform some further checks here locally.

Thanks,
Shane

The topic ‘[Closed] Using Form to add RFG to Custom Post’ is closed to new replies.