question on how can I disable form_input area? |
[eluser]Nano HE[/eluser]
Hello. How can I do this? I want only disable one input area in my form. And show some alert contents in the disabled form instead. Code: $data = array( and the webpage viwed like this, Like this: [Disabled Search for Traffic Limitation]
[eluser]TWP Marketing[/eluser]
[quote author="Nano HE" date="1347580582"]Hello. How can I do this? I want only disable one input area in my form. And show some alert contents in the disabled form instead. Code: $data = array( echo ' [Disabled Search for Traffic Limitation]'; } and the webpage viwed like this, Like this: [Disabled Search for Traffic Limitation] [/quote] You will need to pass the flag: $disable from your controller as a boolean true/false
[eluser]PhilTem[/eluser]
As CroNiX said you need to set the disabled attribute, however not in the way he said sine this is considered not RFC compliant, so use Code: $data = array( which will create a form input that can not be edited though (and by the way won't be submitted when the form is submitted ![]()
[eluser]CroNiX[/eluser]
@philTem, did you look at the html that using 'disabled' => TRUE produces? It's the same. Code: <input type="text" size="25" disabled="disabled" maxlength="100" id="searchform" value="" name="keyword">
[eluser]Nano HE[/eluser]
Code: echo form_open($formSearchOpenUrl, $attributes); Via URL: http://www.w3schools.com/tags/tag_input.asp I found the default recommand attribute value for Code: 'disable' Code: 'disabled' Thank you so much. My problem solved with your help. I posted my code here. |
Welcome Guest, Not a member yet? Register Sign In |