I am using Mobile Number module to enable OTP verification. Also, with Drupal commerce, I have also enabled anonymous checkout. During the execution of the rule Create a new account for an anonymous order, as mobile number field is mandatory during registration, it needs to be defined in 'Create a new entity' action element for creating User.
I am using the same mobile number field in Account Registration fields as well as Billing Information/Customer Profile fields. If I use, commerce-order:commerce-customer-billing:field-mobile as data selector, I get the following error:

Unable to create entity user": Invalid data value given. Be sure it matches the required data type and format. Value at user()->field_mobile: array ( 'value' => '+911234567890', 'country' => 'IN', 'local_number' => '01234567890', 'verified' => '1', 'tfa' => '0', ). If I usecommerce-order:commerce-customer-billing:field-mobile:value`, then I get a 500 error and site crashes.

I don't know what I am missing. Everything works fine without Mobile number fields. But I need them as mandatory.

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.