It would be nice to be able to set a placeholder on text fields. Is something like this possible without extending?
Field::make('text', 'crb_email', 'Text Field')->set_placeholder('[email protected]')
I haven't dug into the code that far yet, but it would also be swell if we could define acceptable file types/extensions for the File field (ie: "pdf, docx, txt", etc). I see that it supports audio, video, and image currently. I haven't played with that yet.
Minor wishlist item - I'd like to be able to have the radio buttons display horizontally as an option.
This is a dupe, but it would be nice to have email and url field types (with default validation).
I don't want to push it, but field prefixes and suffixes would be neat (https://v4-alpha.getbootstrap.com/components/input-group/#basic-example)... like how the date_time field has, for example.
Again, I have not dug deep enough yet, but it would be nice if dropdowns could be configured not to be 100% width w/o the use of CSS. It seems odd that 100% width for a select is default. ?
Oooh, and if you really want to give ACF a run for their money... an oEmbed field equivalent!
This is not me complaining. I think y'all are doing amazing work. I would love to contribute, but I'm still learning how everything is structured. I'm just throwing things out there. Thank you for all of your development time! I appreciate this plugin/framework very much.
This plugin/framework has actually got me excited again. I want to build things with it. (I am also not disparaging ACF - it is one of my favorite plugins. However, the stuff that makes it great are also not redistributable [for free], which is why I am here).
We are very happy that you share our excitement about CF! We really appreciate your valuable feedback and great ideas - keep them coming!
It would be nice to be able to set a placeholder on text fields.
We are considering a generic Input_Field which will provide full control over the input tag and it's attributes. Other fields such as text, email etc. can then extend this one, for example. We will keep you updated on how this unfolds.
I haven't dug into the code that far yet, but it would also be swell if we could define acceptable file types/extensions
You can have a single or multiple file type limitation on file fields like this:
Field::make( 'file', 'crb_my_file_field' )
->set_type(array('application/pdf', 'image/jpeg'))
To limit the field to mime types that are not supported by WordPress you have to add a filter like this one:
add_filter( 'upload_mimes', 'crb_my_custom_upload_mime_types' );
function crb_my_custom_upload_mime_types( $mimes=array() ) {
$mimes['dwg'] = 'application/dwg';
return $mimes;
}
Note that this allows uploads of this file type through the Media administration section as well.
This is a dupe, but it would be nice to have email and url field types (with default validation).
This will come as a result of the generic Input_Field.
I don't want to push it, but field prefixes and suffixes would be neat
This is a great idea and we will be looking into implementing this - we've created feature request #184
Again, I have not dug deep enough yet, but it would be nice if dropdowns could be configured not to be 100% width w/o the use of CSS. It seems odd that 100% width for a select is default. ?
This is a design decision for consistency's sake. Feel free to discuss in #63
Oooh, and if you really want to give ACF a run for their money... an oEmbed field equivalent!
We will be considering this after we merge our ReactJS rewrite branch. (#185)
2.0.0 has been released which adds a generic ->set_attribute() method to fields allowing you to directly change input attributes.
An example is available here: https://carbonfields.net/docs/fields-text/?crb_version=2-0-0
Most helpful comment
I haven't dug into the code that far yet, but it would also be swell if we could define acceptable file types/extensions for the File field (ie: "pdf, docx, txt", etc). I see that it supports audio, video, and image currently. I haven't played with that yet.
Minor wishlist item - I'd like to be able to have the radio buttons display horizontally as an option.
This is a dupe, but it would be nice to have
emailandurlfield types (with default validation).I don't want to push it, but field prefixes and suffixes would be neat (https://v4-alpha.getbootstrap.com/components/input-group/#basic-example)... like how the date_time field has, for example.
Again, I have not dug deep enough yet, but it would be nice if dropdowns could be configured not to be 100% width w/o the use of CSS. It seems odd that 100% width for a
selectis default. ?Oooh, and if you really want to give ACF a run for their money... an oEmbed field equivalent!
This is not me complaining. I think y'all are doing amazing work. I would love to contribute, but I'm still learning how everything is structured. I'm just throwing things out there. Thank you for all of your development time! I appreciate this plugin/framework very much.
This plugin/framework has actually got me excited again. I want to build things with it. (I am also not disparaging ACF - it is one of my favorite plugins. However, the stuff that makes it great are also not redistributable [for free], which is why I am here).