-1

My code from smarty template is as below. The disable="disabled" property is not working on text fields. Can you tell me why it's not working?

<input type="text" name="{$sheet_type}_{$subject_topic_data.subject_id}_{$topic_diff_level_data.topic_id}_{$key_diff_lvl}" id="{$sheet_type}_{$subject_topic_data.subject_id}_{$topic_diff_level_data.topic_id}_{$key_diff_lvl}"  maxlength="3" class="mini" value="{$diff_level.added_no_questions}" disabled="disabled">
Cœur
  • 37,241
  • 25
  • 195
  • 267
PHPLover
  • 1
  • 51
  • 158
  • 311
  • try only using `disabled` instead of `disabled='disabled'` – dhpratik Sep 19 '13 at 07:05
  • If Smarty is somehow essential to the problem, describe how, and give more details; if not, remove the tag. If using PHP is relevant, describe how; if not, show an HTML-only example (with no PHP variables) that actually reproduces the problem. Explain what you mean by “not working” and which browser(s) you used for texting. – Jukka K. Korpela Sep 19 '13 at 08:48

1 Answers1

0
<input type="text" name="{$sheet_type}_{$subject_topic_data.subject_id}_{$topic_diff_level_data.topic_id}_{$key_diff_lvl}" id="{$sheet_type}_{$subject_topic_data.subject_id}_{$topic_diff_level_data.topic_id}_{$key_diff_lvl}"  maxlength="3" class="mini" value="{$diff_level.added_no_questions}" disabled="disabled">

checked like this.. And it is working fine.

You can also mention only disabled but as per my knowledge, in XHTML, attribute minimization is forbidden, and the disabled attribute must be defined as <input disabled="disabled" />

Ganesh Pandhere
  • 1,612
  • 8
  • 11