jofrysutanto / windsor Goto Github PK
View Code? Open in Web Editor NEWYAML-ised fields configuration for ACF
Home Page: https://windsor-docs.netlify.app/
License: Apache License 2.0
YAML-ised fields configuration for ACF
Home Page: https://windsor-docs.netlify.app/
License: Apache License 2.0
Hi @jofrysutanto,
First of all, thanks for creating this awesome project, I can't wait to (hopefully) switch from ACF Builder as this looks like a much easier and cleaner way of using ACF with version control support ๐
Unfortunately it appears that ACF Windsors can't currently work with dependency based WordPress structures such as Roots Bedrock, as add_action is called before the function exists.
Other projects such as Timber get around this by having the user initialise it via functions.php.
Hopefully this is something you'd be willing to change as I'd love to use ACF Windsor moving forward.
Any questions or what not just let me know.
Cheers,
Tom ๐
I am trying to make a form builder using tabs and I use groups so that I can use the table format and condense the options. I often find ACF fails for lack of good UI. Of course I know how I could make this work, but this package is less about how to do things and more about how to do things as efficiently and DRY. That said I don't think it's possible to exclude sub_fields or it needs more explanation. Here is my example.
fields:
tab_base:
label: Base
type: tab
primary:
label: ''
type: group
layout: table
sub_fields:
required:
label: Required
type: true_false
label:
label: Label
type: text
required: true
name:
label: Name
type: text
placeholder:
label: Placeholder
type: text
options:
label: Options
type: repeater
required: true
layout: table
min: 1
button_label: 'Add Option'
rows_per_page: 20
sub_fields:
option:
label: Option
type: text
tab_validation:
label: Validation
type: tab
validation:
label: ''
type: group
layout: table
sub_fields:
min:
label: Min
type: number
max:
label: Max
type: number
regex:
label: Regex
type: text
mask:
label: Mask
type: text
title: 'Form'
key: 'form_default'
position: 'acf_after_title'
hide_on_screen:
- the_content
location:
-
-
param: post_type
operator: '=='
value: form
show_in_graphql: 1
graphql_field_name: metaForm
fields:
form_url:
type: url
label: Form Endpoint
fields:
label: Fields
aria-label: ''
type: flexible_content
button_label: 'Add Field'
layouts:
text:
display: 'block'
label: Text
sub_fields:
form:
label: Form
type: "blueprint"
source: "form"
prefix: false
prefix_label: false
excludes:
- options
select:
display: 'block'
label: Dropdown
sub_fields:
form:
label: Form
type: "blueprint"
source: "form"
prefix: false
prefix_label: false
textarea:
display: 'block'
label: Message
sub_fields:
form:
label: Form
type: "blueprint"
source: "form"
prefix: false
prefix_label: false
excludes:
- options
- validation_regex
- regex
- mask
Love the package. Blueprints are a lifesaver. However there are symfony dependencies that require php 8.1 or greater and that isn't an option for many Wordpress hosts at the moment. They only consider 8.0 stable. Anyway to clean this package up to be compatible. I don't really want to maintain a fork. Thanks for this awesome package.
Ever think about yaml for post type and taxonomy creation? Ive seen older implementations but something clean like your current package
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.