You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Register a new Pods block using the 'pods_register_block_type' function and include field types distinct from text (e.g., date or select). For field settings, use field configs of existing fields obtained from the API
Add the block to some page.
Try to fill out the fields
Current behavior:
Field types other than text are not present in the registered block.
Expected behavior:
All fields passed to the signup function should be present in the block.
Details:
The documentation (https://docs.pods.io/code/blocks-api/) states that "fields in pods_register_block_type() use the same exact field config form as normal Pod fields," and it does not mention any field type restrictions.
WPLake
changed the title
Pods blocks feature (pods_register_block_type) doesn't work for most of field types
Pods blocks feature (pods_register_block_type) doesn't work with configs from 'get_args()'
Mar 8, 2024
pick (must provide data array or a callable function)
boolean
The reason for the reduced support here is that this was originally developed before we had all of our field types converted for React. As a result, these field types are mapped to the supported field types in Gutenberg at the time.
If we get a good React developer helping on the project again, we can consolidate the form fields handling in our Blocks API to completely map over to our Pods DFV API which powers our normal forms (these are different React APIs at the moment).
@sc0ttkclark Thank you for the clarification. I hope that the upcoming improvement to the WP Blocks API in version 6.5 is just the beginning, and eventually, we'll have a fully developed API.
Description
How to replicate the issue:
Current behavior:
Field types other than text are not present in the registered block.
Expected behavior:
All fields passed to the signup function should be present in the block.
Details:
The documentation (https://docs.pods.io/code/blocks-api/) states that "fields in pods_register_block_type() use the same exact field config form as normal Pod fields," and it does not mention any field type restrictions.
The text was updated successfully, but these errors were encountered: