A while back I built a site with Ubercart 7.x-3.0-beta3 and I can edit checkout fields at admin/store/settings/checkout/fields to make the phone number required. I've recently built another site, this time using Ubercart 7.x-3.8 and now I cannot easily make the phone number required. I've looked up and saw I could do this

You can use a hook_form_alter() on 'uc_checkout_form' to change

  $form['panes']['delivery']['delivery_phone']['#required'] = true;

BUT I do not know how to implement hook_form_alter

Is there an easy way to make the phone number required at checkout? If the only way to do this is through hook_form_alter how exactly would I do that?

Comments

TR’s picture

Category: Bug report » Support request
Priority: Major » Normal
Status: Active » Fixed

admin/store/settings/countries/fields

fineartist99’s picture

Thank you so much.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.