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

FieldSettings not being passed to field collection region. #2053

Closed
sit-harry opened this issue Mar 20, 2024 · 2 comments
Closed

FieldSettings not being passed to field collection region. #2053

sit-harry opened this issue Mar 20, 2024 · 2 comments

Comments

@sit-harry
Copy link
Contributor

Hi there!

It looks like field setting attributes aren't being passed to the field whenever it is a single field collection.

If we have the below example...

[PageType(Title = "Standard page")]
public class StandardPage : Page<StandardPage>
{
    [Region]
    [StringFieldSettings(DefaultValue = "Hello World!")]
    public List<StringField> Fields { get; set; }

    [Region]
    public TestRegion TestRegion { get; set; }
}

public class TestRegion
{
    [Field]
    public StringField RegularStringField { get; set; }

    [Field]
    [StringFieldSettings(DefaultValue = "Hello World!")]
    public StringField FancyStringField { get; set; }
}

The FancyStringField works as expected, with the settings being pushed through to the field.

FieldWithinRegion

However, with the Fields region, the settings aren't being pushed through.

FieldCollection

It looks like the settings needs to be added to the default ContentTypeField here and then pulled through here.

Will try to get a PR together soon, but let me know if I'm missing anything here, thanks :)

@tidyui
Copy link
Member

tidyui commented Mar 20, 2024

I simply just don’t think this case is covered by the settings. I’ll tag this as a feature request!

@tidyui
Copy link
Member

tidyui commented Mar 22, 2024

Fixed as of #2054

@tidyui tidyui closed this as completed Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants