Skip Navigation

[Resolved] Adding a custom field as a block

This support ticket is created 5 years, 1 month 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by logicelf 5 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1370637

Hi folks,

I'm having another go with the Views 3 beta. Am I completely missing something? I'd like to define a custom field, then allow my editors to add one or more of them to a custom post type via the block editor.

I can see how to add the output of a custom field that's already been populated (from within the legacy editor) to a view, but I can't see how to add new editable instances of existing custom fields to a post.

Am I attempting to do something that's not possible? To clarify - I want to avoid presenting my users with a messy combination of the block editor for the standard post content and the legacy editor for custom fields. I want them to be able to create a post, then add everything via the block editor.

Thanks in advance for any pointers,

James

#1371033

Hi, the typical workflow is that custom fields are first defined separately from the post editor screen. Normally that's done in Toolset > Custom Fields > Post Fields. The fields are defined here in field groups, which can then be assigned to one or more custom post types, or can be assigned other data-dependent display conditions. Based on those conditions, the custom field group will appear in the post editor screen regardless of whether that post type uses the classic editor experience or the block editor experience. In either case, the custom fields are visible in the post editor screen.

There is also the Repeatable Field Group feature. In this feature, there is a repeatable group of fields defined in Toolset > Custom Fields > Post Fields. That Repeatable Field Group (RFG) can have any number of custom fields predefined per row. Then in the post editor screen, someone can create multiple instances (rows) of that RFG. In order to create a repeatable field group, a custom field group must be assigned only to a single post type. Then inside that custom field group, you will have the ability to create RFGs.

Another type of repetitive field is a custom field that accepts multiple values. This isn't like an RFG because you can't combine multiple fields per instance, but when creating or editing a post your Users can assign multiple values to the same field.

Let me know if you have questions about these elements.

#1371259

Hi Christian,

Thanks for your reply. That's not quite what I meant, but perhaps I didn't explain myself very clearly. In any event, I've decided to do things slightly differently, so this isn't an issue.

Thanks,

James