Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Add default value support for group fields #255

Closed
estruyf opened this issue Feb 17, 2022 · 5 comments
Closed

Enhancement: Add default value support for group fields #255

estruyf opened this issue Feb 17, 2022 · 5 comments
Projects
Milestone

Comments

@estruyf
Copy link
Owner

estruyf commented Feb 17, 2022

@estruyf , one word amazing! I have been able to rebuild my troublesome about-section. A couple of things, is it possible to add an image field to fieldGroup and add a default string to a field?
When I select an image the dialog closes or when I look at the current about-section, the image is not found (that could be because it is not in the media folder).
A workaround for the default string is to create a string with one choice and I tried to use a placeholder without success.

Originally posted by @apowell656 in #176 (comment)

@bwklein
Copy link

bwklein commented Feb 17, 2022

I don't think that defaults work now for any fields in a field group.

In this video I set a default string of "Page Content" to the 'label' field in a field group. When I add that page section to the array, the label is not pre-populated with the default string.

no_default.mp4

@estruyf estruyf changed the title Enhancement: Add default value support in the image field Enhancement: Add default value support for group fields Feb 17, 2022
@estruyf
Copy link
Owner Author

estruyf commented Feb 17, 2022

Correct, seems I myself did it wrong 🙈, it is for the group fields only indeed.

@zivbk1
Copy link

zivbk1 commented Feb 17, 2022

Can those defaults use placeholders like {{now}}?

@estruyf
Copy link
Owner Author

estruyf commented Feb 18, 2022

@zivbk1 took a bit more work, as this is something which is performed on the backend, but now the block fields can also leverage the same placeholder logic as the root fields.

@estruyf estruyf added this to Done in 6.1.0 Feb 18, 2022
@estruyf estruyf moved this from Done to In progress in 6.1.0 Feb 18, 2022
@zivbk1
Copy link

zivbk1 commented Feb 18, 2022

Thank you!

@estruyf estruyf added this to the 6.1.0 milestone Feb 18, 2022
@estruyf estruyf moved this from In progress to Done in 6.1.0 Feb 28, 2022
@estruyf estruyf closed this as completed Feb 28, 2022
@estruyf estruyf mentioned this issue Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
6.1.0
  
Done
Development

No branches or pull requests

3 participants