I am using Drupal Commerce. I have enabled the anonymous user to access checkout and place an order. There is this rule available in Drupal commerce("Create a new account for an anonymous order") that creates an account for user's who do not have an account and checkout anonymously.

The Problem is that there is an image field which is required in the user account form. So due this, it is having issue creating a new user, as I am not able to supply a value to it. I have set a default image, but its still having the same issue.

Anyone knows how to set this default image or make it non-required to add image while creating account through rules?

"Create a new account for an anonymous order" Rule?

1 Answer 1


Two options:

  1. Make the field not required at the field level but then use a Form alter hook to make it required when presenting the form.
  2. Make the logo point to the default image by setting the data value to public://your-file-here.png inside of the rule.
  • Will you please elaborate, how I can implement the option 2, when I am trying to set path of image on this field it is returning "Data selector image_path for parameter param_field_field_name is invalid".
    – Dev
    Mar 22, 2016 at 4:22
  • 1
    as you suggested in option 1, I made the field not required from, and then I wrote form_alter() to make the field required. It worked thanks
    – Dev
    Mar 28, 2016 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.