11 votes
Accepted

Add Custom Validation Street Address Field in backend Magento 2

You Can do it by Script and update validation within it.You have to change 'validate_rules' => '{"max_text_length":255,"min_text_length":5}', You can change it directly from DB you have to do it ...
Ketan Borada's user avatar
  • 2,603
8 votes
Accepted

Multiselect attribute not saving in Magento 2.3.0

When creating the customer attribute, please take care about following things: Attribute is added to the attribute set, group customer_eav_attribute eav_entity_attribute Attribute is assigned ...
Ketan Borada's user avatar
  • 2,603
5 votes

Add Custom Validation Street Address Field in backend Magento 2

i am not sure if this works <rule name="required-entry" xsi:type="boolean">true</rule> Example from first name <field name="city" formElement="input"> <argument name="...
jibin george's user avatar
3 votes

Save customer custom address attribute programmatically

As you have using Api interface, So, you have to add hide_address as an extension attribute of Magento\Customer\Api\Data\AddressInterface. Create a <Module>/etc/extension_attributes.xml file to ...
Amit Bera's user avatar
  • 77.5k
2 votes

How to fully load customers when returned in a customer collection?

You don't want your afterLoad event to fire and trigger your method because you will be in a similar case as calling load for each customer. I see that you method calls load on the address model. For ...
Marius's user avatar
  • 198k
2 votes
Accepted

How does one persist a extension attribute in the Order addresses?

You have to add an event to your module. In a event is transport the values from object to object. Example Quote Address to Order Address Take a look at this example module to add a custom field to ...
Mr. Lewis's user avatar
  • 1,931
2 votes
Accepted

Magento 2 - Customer address custom attribute option label from value

Load eavConfig via dependency Injection. protected $eavConfig; public function __construct( \Magento\Eav\Model\Config $eavConfig, ) { $this->eavConfig = $eavConfig; } Than you can get the ...
Arbab Ahmed's user avatar
1 vote

How to remove the visibility for customer address attribute field while creating order in magento backend

Checklist: Check if your module is enable: bin/magento module:status Add the sequence (Magento_Sales) like explained here: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-...
CloudySi's user avatar
  • 374
1 vote
Accepted

Get Dropdown Value from a Custom Customer Address Attribute

Try this two code may be help you :- 1) $custom = $customer->getResource()->getAttribute('your_attribute')->getFrontend()->getValue($address); 2) $customer = $this->...
Mohit Patel's user avatar
  • 3,823
1 vote

Add Custom Validation Street Address Field in backend Magento 2

update column validate_rules = {"min_text_length":"1","max_text_length":"10","input_validation":"length"} in table customer_eav_attribute ...
dung lv's user avatar
  • 21
1 vote

Set value to customer custom address attribute in magento2

if you are saving multiselect attribute you have to store option id instead it's value public function getAllOptions() { return [ 'option1' => [ 'label' => '...
Ketan Borada's user avatar
  • 2,603
1 vote
Accepted

Magento 2 : How to change state list for USA?

This issue has already been asked and resolved here - How to change state list for USA in Magento 2? Quoting it for your reference; You can filter out the options using a Plugin for the ...
Vivek Kumar's user avatar
  • 5,385
1 vote
Accepted

How to fully load customers when returned in a customer collection?

Stop the presses! I was looking through some related code and it occurs to me that this is better solved going the other way around. Start with the attribute and join backwards up to the customer ...
cygnus digital's user avatar
1 vote

Magento 2 : How to add address attribute in checkout new address form?

I think below link will be help to you. http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_edit_form.html
hardik trivedi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible