Skip Navigation

[Resolved] Defining the post title on a post that gets created with a post form.

This support ticket is created 2 years, 6 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 3 voices.

Last updated by melodyM 2 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#2505821

I have set up a post form to create a post using the fields in the form. Everything is working here except for the Post Title. I've submitted 5 test form submissions and they have post titles like the following:

CRED Auto Draft 678002805787238a75bc48d505b84200

There is a Freelancer Title field supplied by the system. And then I have my own single line field that I created that also is called Freelancer Title. When I used my field on one of the 5 tests, I was somehow able to get it to work once to supply the correct post title, but I don't see a way to remove the system generated field. So end users were seeing two fields for Freelancer Title on the form.

In the Edit form page, the field supplied by the system has a lock there while my field has a trashcan. I can trash my field, but the system generated field doesn't use the data entered by the end user in the form for the post title. So I'm not sure how to handle this. Any advice would be appreciated.

#2505975

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi there

Posts must have a title, and those long CRED titles you see are added by Toolset Forms because your form to publish a post does not include a post title field.

Is that your intention? Would you not use the Post Title field as the "Freelancer Title" field? (You can give the post title field a different label.)

Otherwise you can use code to dynamically generate a post title.

Check the Forms API guide to the cred_save_data action; expand the examples and the last sample is an example of updating the post title: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

#2506675

Well that's what I'm confused on. It's not my intention to not have a title field here. I'm just not sure of what I'm doing in the form setup.

We have our own field for freelancer title that works. But then there is also another one in the form that has a lock on it, so we can't delete it. Whatever I put in the second field does work to create the post title properly. But then I can't delete the first field.

I now found that I had a custom field called Freelancer Title in the field group that was required. I deleted that field from the field group. I had a reason for having that at the time where I was using that to show something different from the actual post title, but I think that is causing the problem here. So I deleted that field. That eliminated one of the Freelancer Title fields from the form edit page.

But now when I go to the page where the form is displayed it now still has that second field present and it says:

There is a problem with freelancer-title field. Please check CRED form.

I may have to try rebuilding this form from scratch. I think I've messed this one up.

#2507209

Hi,

Thank you for sharing this update.

You won't have to rebuild the form from scratch. Now, that you've removed the custom field for the title from the field group, just visit the form edit screen and that deleted field won't be showing in the list of form fields.
( the one for the post title will still be there )

Save the form once and when you'll check the form on the front end it will not be showing the error about the deleted 'freelancer-title' field.

regards,
Waqar

#2507601

My issue is resolved now. Thank you!