Skip Navigation

[Resolved] Edit form get ID

This support ticket is created 4 years, 4 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 4 replies, has 2 voices.

Last updated by richardB-16 4 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#1760209

Apologies this seems like it should be very simple but I'm a toolset n00b..

Similar issue to this ticket, but can't quite work it out: https://toolset.com/forums/topic/front-end-relational-form-not-submitting/

I am displaying a record and want a simple 'status update' which updates a field in the parent post.

My form has this field but it's giving me an error "There is a problem with post-id field. Please check CRED form."

[cred_field field='wpv-post-id' class='form-control' output='bootstrap' select_text='--- not set ---' required='false' value='[wpv-post-id]']

I've tried lots of combos of field='wpv-post-id' and value='[wpv-post-id]' but can't work out where I'm going wrong

#1760451

Shane
Supporter

Languages: English (English )

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

Hi Richard,

Thank you for getting in touch.

It seems that you don't have a custom field created called "Post-ID". The shortcode below assumes that there is a custom field setup called "wpv-post-id".

[cred_field field='wpv-post-id' class='form-control' output='bootstrap' select_text='--- not set ---' required='false' value='[wpv-post-id]']

Is this field created on your post itself and you just want to populate it dynamically ?

Please let me know and we can take it from there. Also send me a screenshot of the field.

Thanks,
Shane

#1760469

Hi Shane - it's just the parent post, so the native WordPress post ID for that post?

#1760475

Shane
Supporter

Languages: English (English )

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

Hi Richard,

" it's just the parent post, so the native WordPress post ID for that post?"

Yes I understand this, however you want to get the ID of that post into the form.

The form itself needs a place to store this id. You are getting this error here "There is a problem with post-id field. Please check CRED form." because there is not field on the post type called post-id. Each form field must have their respective matching custom field created on the Post Type itself.

Perhaps you can try creating a Generic field on the form and use the same [wpv-post-id] shortcode to pass the current post ID into that generic form field.

Thanks,
Shane

#1763527

My issue is resolved now. Thank you!