Gist 3957869
✓ Published0🌍 Public
Aallyraza
Last edited Oct 26, 2012
Created on Oct 26, 2012
This example demonstrates a simple form interaction that disables a text input field based on the selected operating system. The form contains a dropdown menu and a text field; choosing “MAC” disables the text input, while selecting “PC” re-enables it. The behavior is implemented with jQuery, using the `.change()` event handler and the `.attr()` and `.removeAttr()` methods to toggle the `disabled` attribute. The code relies on the Yii framework’s `registerCoreScript` method to load jQuery, and the form submits via POST, though no server-side processing is shown.
AI-generated description