Conditionally disabled/enables form fields based on the current
        section in the radio group
333106
def applyStyleRules(self):
        
        for button, widget in zip(self.radioButtons, self.widgets):
            if isinstance(widget, CheckBox):
                widget.hideInput()
            if not button.GetValue(): # not checked
                widget.widget.Disable()
            else:
                widget.widget.Enable()
937663
private function dynamicFormCheck()
    {
        if ($this->field->hasDynamicForms()) {
            $this->dynamicFormParentName = $this->field->getName();
            $value = $this->field->getValue();
            $forms = $this->field->getDynamicForms();
            $this->includeDynamicFormJavascript = true;
            foreach ($forms as $dynamicTriggerValue => $form) {
                $this->dynamicFormVisible = ($value == $dynamicTriggerValue);
                $dynamicFields = $form->getFields();
                $this->processFields($dynamicFields, $dynamicTriggerValue);
            }
            unset($this->dynamicFormParentName);
        }
    }
415628
function(form, options) {
      var values = {}
        , i
        , j
        , input
        , inputs
        , option
        , value;

      if (v.isJqueryElement(form)) {
        form = form[0];
      }

      if (!form) {
        return values;
      }

      options = options || {};

      inputs = form.querySelectorAll("input[name], textarea[name]");
      for (i = 0; i < inputs.length; ++i) {
        input = inputs.item(i);

        if (v.isDefined(input.getAttribute("data-ignored"))) {
          continue;
        }

        var name = input.name.replace(/\./g, "\\\\.");
        value = v.sanitizeFormValue(input.value, options);
        if (input.type === "number") {
          value = value ? +value : null;
        } else if (input.type === "checkbox") {
          if (input.attributes.value) {
            if (!input.checked) {
              value = values[name] || null;
            }
          } else {
            value = input.checked;
          }
        } else if (input.type === "radio") {
          if (!input.checked) {
            value = values[name] || null;
          }
        }
        values[name] = value;
      }

      inputs = form.querySelectorAll("select[name]");
      for (i = 0; i < inputs.length; ++i) {
        input = inputs.item(i);
        if (v.isDefined(input.getAttribute("data-ignored"))) {
          continue;
        }

        if (input.multiple) {
          value = [];
          for (j in input.options) {
            option = input.options[j];
             if (option && option.selected) {
              value.push(v.sanitizeFormValue(option.value, options));
            }
          }
        } else {
          var _val = typeof input.options[input.selectedIndex] !== 'undefined' ? input.options[input.selectedIndex].value : /* istanbul ignore next */ '';
          value = v.sanitizeFormValue(_val, options);
        }
        values[input.name] = value;
      }

      return values;
    }
1153802
def bind(self, form):
        """"""
        field = self.field(default=self.default, **self.field_kwargs)
        form._fields[self.name] = field.bind(form, self.name, prefix=form._prefix)
900843
public void setHideDisabled(final boolean hideDisabled) {
        if (hideDisabled)
            attrMixin.setAttribute(HIDE_DISABLED, Boolean.toString(true));
        else
            attrMixin.removeAttribute(HIDE_DISABLED);
    }
907993
function validateField(fieldId, submission, sectionIndex, cb) {
      init();

      if (_.isFunction(sectionIndex)) {
        cb = sectionIndex;
        sectionIndex = 0;
      }

      var err = initSubmission(submission);
      if (err) {
        return cb(err);
      }

      var submissionField = submissionFieldsMap[fieldId][sectionIndex];
      var fieldDef = fieldMap[fieldId];

      getFieldValidationStatus(submissionField, fieldDef, null, function(err, res) {
        if (err) {
          return cb(err);
        }
        var ret = {
          validation: {}
        };

        assignValidationResponse(fieldId, sectionIndex, ret.validation, res);
        return cb(undefined, ret);
      });
    }
1369233
def confirm_register_form_factory(Form):
    """"""
    class CsrfDisabledProfileForm(ProfileForm):
        """Subclass of ProfileForm to disable CSRF token in the inner form.

        This class will always be a inner form field of the parent class
        `Form`. The parent will add/remove the CSRF token in the form.
        """

        def __init__(self, *args, **kwargs):
            """Initialize the object by hardcoding CSRF token to false."""
            kwargs = _update_with_csrf_disabled(kwargs)
            super(CsrfDisabledProfileForm, self).__init__(*args, **kwargs)

    class ConfirmRegisterForm(Form):
        """RegisterForm extended with UserProfile details."""

        profile = FormField(CsrfDisabledProfileForm, separator='.')

    return ConfirmRegisterForm
1139830
function() {
			/// <summary>
			/// Resets the controlled form.
			/// Resets input fields to their original value (requires form plugin), removes classes
			/// indicating invalid elements and hides error messages.
			/// </summary>

			if ( $.fn.resetForm )
				$( this.currentForm ).resetForm();
			this.submitted = {};
			this.prepareForm();
			this.hideErrors();
			this.elements().removeClass( this.settings.errorClass );
		}
118774
def formfield(self, **kwargs):
        """"""

        defaults = dict(
            form_class=LocalizedFieldForm,
            required=False if self.blank else self.required
        )
        defaults.update(kwargs)
        return super().formfield(**defaults)
401349
function() {
			var self = this;
			self.$input.prop('disabled', false);
			self.$control_input.prop('disabled', false).prop('tabindex', self.tabIndex);
			self.isDisabled = false;
			self.unlock();
		}
216552
function on(input, state, keep) {
    var node = input[0],
      parent = input.parent(),
      checked = state == _checked,
      indeterminate = state == _indeterminate,
      disabled = state == _disabled,
      callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
      regular = option(input, callback + capitalize(node[_type])),
      specific = option(input, state + capitalize(node[_type]));

    // Prevent unnecessary actions
    if (node[state] !== true) {

      // Toggle assigned radio buttons
      if (!keep && state == _checked && node[_type] == _radio && node.name) {
        var form = input.closest('form'),
          inputs = 'input[name="' + node.name + '"]';

        inputs = form.length ? form.find(inputs) : $(inputs);

        inputs.each(function() {
          if (this !== node && $(this).data(_iCheck)) {
            off($(this), state);
          };
        });
      };

      // Indeterminate state
      if (indeterminate) {

        // Add indeterminate state
        node[state] = true;

        // Remove checked state
        if (node[_checked]) {
          off(input, _checked, 'force');
        };

      // Checked or disabled state
      } else {

        // Add checked or disabled state
        if (!keep) {
          node[state] = true;
        };

        // Remove indeterminate state
        if (checked && node[_indeterminate]) {
          off(input, _indeterminate, false);
        };
      };

      // Trigger callbacks
      callbacks(input, checked, state, keep);
    };

    // Add proper cursor
    if (node[_disabled] && !!option(input, _cursor, true)) {
      parent.find('.' + _iCheckHelper).css(_cursor, 'default');
    };

    // Add state class
    parent[_add](specific || option(input, state) || '');

    // Set ARIA attribute
    disabled ? parent.attr('aria-disabled', 'true') : parent.attr('aria-checked', indeterminate ? 'mixed' : 'true');

    // Remove regular state class
    parent[_remove](regular || option(input, callback) || '');
  }
204943
function( taxonomy, value ) {
			this.writeDebug('selectQueryStringFilters', arguments);

			var $taxGroupContainer = $('#' + this.settings.taxonomyFilters[taxonomy]);

			// Handle checkboxes.
			if ( $taxGroupContainer.find('input[type="checkbox"]').length ) {

				for ( var i = 0; i < value.length; i++ ) {
					$taxGroupContainer.find('input:checkbox[value="' + value[i] + '"]').prop('checked', true);
				}
			}

			// Handle select fields.
			if ( $taxGroupContainer.find('select').length ) {
				// Only expecting one value for select fields.
				$taxGroupContainer.find('option[value="' + value[0] + '"]').prop('selected', true);
			}

			// Handle radio buttons.
			if ( $taxGroupContainer.find('input[type="radio"]').length ) {
				// Only one value for radio button.
				$taxGroupContainer.find('input:radio[value="' + value[0] + '"]').prop('checked', true);
			}
		}
322180
def set_selected_radio_button(self):
        """"""
        dont_use_button = self.default_input_button_group.button(
            len(self._parameter.default_values) - 2)
        dont_use_button.setChecked(True)
1102949
function(opts, fm) {
				if (fm.UA.ltIE8 || !fm.options.cdns.ace) {
					this.disabled = true;
				}
			}
136827
function () {
			
			// Delegate event listening because list of choices is dynamic
			// so we can't listen on each <input type="radio" class='inputEx-RadioField-radio' />
			
			// Change event (IE does not fire "change" event, so listen to click instead)
			Event.delegate(this.fieldContainer, YAHOO.env.ua.ie ? "click" : "change", function(e, matchedEl, container) {
				this.onChange(e);
			}, "input.inputEx-RadioField-radio", this, true);
			
			// Focus / Blur events
			Event.delegate(this.fieldContainer, "focusin", function(e, matchedEl, container) {
				this.onFocus(e);
			}, "input.inputEx-RadioField-radio", this, true);
			
			Event.delegate(this.fieldContainer, "focusout", function(e, matchedEl, container) {
				this.onBlur(e);
			}, "input.inputEx-RadioField-radio", this, true);
			
			// AnyField events
			if (this.allowAnyChoice) {
				
				this.anyField.updatedEvt.subscribe(function (e, params) {
					
					var value = params[0];
					this.radioAny.value = value;
					
					this.setClassFromState();
					
					inputEx.RadioField.superclass.onChange.call(this,e);
					
				}, this, true);
				
				// Update radio field style after editing anyField content !
				Event.addBlurListener(this.anyField.el, this.onBlur, this, true);
			}
		}
448264
function getFormFields(form) {
  // Grab all fields that are enabled, and return them as an array.
  // If enabled, remove that property and apply the field name.
  var fields = Object.keys(form.fields).reduce(function (result, fieldKey) {
    var field = _.clone(form.fields[fieldKey]);

    if (!field.enabled) {
      return result;
    }

    // Append the field to field order in case it's not present.
    if (form.fieldOrder.indexOf(fieldKey) === -1) {
      form.fieldOrder.push(fieldKey);
    }

    field.name = fieldKey;
    delete field.enabled;

    result.push(field);

    return result;
  }, []);

  // Sort fields by the defined fieldOrder.
  // Fields that are not in fieldOrder will be placed at the end of the array.
  fields.sort(function (a, b) {
    var indexA = form.fieldOrder.indexOf(a.name);
    var indexB = form.fieldOrder.indexOf(b.name);

    if (indexA === -1) {
      return 0;
    }

    if (indexB === -1) {
      return -1;
    }

    if (indexA > indexB) {
      return 1;
    }

    if (indexA < indexB) {
      return -1;
    }

    return 0;
  });

  return fields;
}
882936
function( field, resque ) {
					if ( field.attr( "name" ) === undefined && field.attr( "id" ) === undefined ) {
						return false;
					}
					var name = field.attr( "name" );
					if ( field.is( ":checkbox" ) && resque !== "false" && ( name === undefined || name.indexOf( "[" ) === -1 ) ) {
						// If we aren't named by name (e.g. id) or we aren't in a multiple element field
						field.prop( "checked", true );
					} else if( field.is( ":checkbox" ) && resque === "false" && ( name === undefined || name.indexOf( "[" ) === -1 ) ) {
						// If we aren't named by name (e.g. id) or we aren't in a multiple element field
						field.prop( "checked", false );
					} else if ( field.is( ":radio" ) ) {
						if ( field.val() === resque ) {
							field.prop( "checked", true );
						}
					} else if ( name === undefined || name.indexOf( "[" ) === -1 ) {
						// If we aren't named by name (e.g. id) or we aren't in a multiple element field
						field.val( resque );
					} else {
						resque = resque.split( "," );
						field.val( resque );
					}
				}