cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Change default address fields to non-mandatory

Former Member
0 Likes
585

Hello,

I am attempting to make title, firstname and lastname non-mandatory on address. The source is building and running without error, however the user is still unable to save the address in the frontend. No error is displayed in the logs it simply states on screen to address errors (no fields are highlighted). Here are the steps I have carried out so far...

  1. Custom Address Form extending addressform. This contains get/set methods e.g. getCustomFirstName and setCustomFirstName

  2. Custom Address Data Util extending addressdatautil. This calls the get/set of the methods in custom address form

  3. Custom Address Validator implementing Validator. This is an entire copy of the AddressValidator with the validation commented out for non-mandatory fields

  4. PageController pointing to custom address validator

  5. Custom MyCompanyManageUnitAddAddressPage.jsp with formelement path set to customfield of form and mandatory = "false"

  6. AddressFormElements.tag page to set fields as mandatory = "false" (And set path to customfield)

I can't figure out what i'm missing, any guidance would be appreciated. I'm new to hybris development and spring framework, so apologies for my very likely basic errors in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

I've got a little further today, it seems that by extending addressForm it is still failing validation of the original title/firstname/lastname fields even though they do not appear on the page.

Looks like I may need a standalone CustomAddressForm??