For our event, we'll be creating three different events to allow different types of attendees (general, student, sponsored) and we want a form filled out for each attendee, so I'm wondering if we can somehow have the Quantity always be 1, and hide the field on the webform. The site is trilingual, so we're trying to keep it as streamlined as possible to sign up (i.e. you click on the type of registration you want, it goes to the webform with ubercart and then you are directed to the appropriate part of the site after completion).

Comments

Rob_Feature’s picture

Sure, so you want to enforce the default quantity and hide the field, correct? Probably the best way to do this is to have a small module which does it for you. You'd use hook_form_alter() and set [#access] to false (which allows you to also add a permission if you want some users to be able to see it). So, it might look something like:

mymodule_form_alter(&$form, $form_state, $form_id) {
  $form['submitted']['quantity']['#access'] = FALSE;
}

I'm not 100% sure that's right (it's off the top of my head) but something like that should do it. Check out hook_form_alter()

Rob_Feature’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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