I want to show Address fields in Registration form of Magento 2.4.0
I have created file in my theme as below.
I have set the action method called setShowAddressFields like true by adding below code.
<?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="customer_form_register"> <action method="setShowAddressFields"> <argument name="show.address.fields" xsi:type="boolean">true</argument> </action> </referenceBlock> </body> </page>
I can see address fields after adding this in the layout file, but I could not see state drop-down. I have attached a screenshot of registration form.