Hi there,
I need assistance with editing SEO fields in the backend of a CMS platform. We have these SEO fields stored in a morphOne relationship with the SeoData model. This approach helps us attach a variety of SEO fields to different models and plugins efficiently, avoiding the need to duplicate columns across our models due to our platform’s setup.
Currently, I am attempting to edit these fields using a nested form. However, I’m facing an issue: the polymorphic fields seoable_type and seoable_id are not being populated, which causes a MySQL error.
Below is my current nestedform configuration:
seo_data:
label: 'SEO Data'
type: nestedform
form:
fields:
data[meta_title]:
label: 'SEO Titel'
type: text
span: left
data[meta_description]:
label: 'SEO Beschrijving'
type: textarea
span: right
Could you please advise on how to ensure these polymorphic fields (seoable_type and seoable_id) are correctly populated when using the nested form?
Thank you for your help!