1

I have a lightning recordForm defined as:

<lightning:recordForm                                       
        objectApiName="Account"
        layoutType="Compact"
        columns="3"
        mode="edit" />

This gives me a form where I can created a new Account. However it always renders the Full layout. If I edit an existing record like so:

<lightning:recordForm 
        recordId: "0000000000000"                                       
        objectApiName="Account"
        layoutType="Compact"
        columns="3"
        mode="edit" />

... it renders the Compact for properly.

Also, if instead of specifying a layout I specify the fields like so:

<lightning:recordForm                                       
        objectApiName="Account"
        fields="{v.myFieldList}"
        columns="3"
        mode="edit" />

It renders just the specified fields as expected.

Is there some reason that I can't render the Compact layout when creating a new record?

  • 1
    It does seem that layoutType=Compact has no effect while creating a new record – Jayant Das Sep 24 '18 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.