CRED plugin provides an API, making it easy to customize your post or user forms. The API includes hooks (actions and filters) to accomplish specific tasks using PHP code.
When you ask for help or report issues, make sure to tell us all related information about your form and what you want to achieve.
Viewing 15 topics - 376 through 390 (of 459 total)
I have created a Post Form to allow Users to add Products from the Front End. I would like to give the Users the option to 1) Save, 2) Preview and 3) Submit the Post depending on whether they have finished the Post and are ready to submit or not.
Solution:
There isn't such kind of built-in feature within Toolset forms plugin, but it needs PHP codes, for example:
Problem:
The user would like to allow visitors to submit content and be able to add alt text and captions to images.
Solution:
When you "Allow Media Insert button in Post Content Rich Text Editor" when you create your Post Form, there will be a native WordPress Image upload screen where you can set those details just as used to in WordPress.
If you use a Types Image Custom Field, the uploader does not present those features and they would either need to be updated to the Attachment via a Custom PHP Script, using values coming from as example some "Single Line" Custom Types Fields, or, you would use the autogenerated values.
Both ways to upload images create a Post of type "attachment".
The different Meta-Data is stored as this:
Alt Text: uses the Post Meta Key _wp_attachment_image_alt
Caption: it's the actual Post Excerpt (Table column name post_excerpt)
Description: it's the actual Post Body (Table column name post_content)
Problem: I have a Form that creates new posts. I would like to automatically set the post title and slug to be the post ID, and I would like to use the permalink format https://mysite.com/post-type-slug/{post-id}
Solution: Use the API hook cred_save_data to automatically set the post title and slug to be the post ID, and choose any pretty permalink format in wp-admin > Settings > Permalinks. Here is a custom code snippet to set the title and slug: