The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Disabling textarea in newthread!
Hi,
I need to disable textarea when starting a new thread and set a condition to enable it. I've added HTML Code:
disabled="disabled" so the original code which is: HTML Code:
<textarea name="message" id="{$editorid}_textarea" rows="10" cols="60" style="display:block; width:$stylevar[messagewidth]; height:{$editor_height}px" tabindex="1" dir="$stylevar[textdirection]">$newpost[message]</textarea> HTML Code:
<textarea name="message" id="{$editorid}_textarea" rows="10" cols="60" style="display:block; width:$stylevar[messagewidth]; height:{$editor_height}px" tabindex="1" dir="$stylevar[textdirection]" disabled="disabled">$newpost[message]</textarea> when I remove HTML Code:
id="{$editorid}_textarea" is there anyway so that i can disable the textarea without disabling editor tools? or is there anyway to change the id value of newthread textarea? thanks |
#2
|
||||
|
||||
I found one page that said disabled is not a valid attribute for the textarea field (but found others that said it was fine - weird!). You could try readonly="readonly" and see if that does what you want.
|
#3
|
|||
|
|||
did not think about readonly. lol
anyway, I tried disabled attribute in single html file and it works fine with textarea field. and it works with vb textarea in newthread too. but only when editor tools disabled and not displayed. if they are displayed then it does not working unless I remove the (id="{$editorid}_textarea") from the code that I mentioned in the first post of this thread. if I remove the (id="{$editorid}_textarea") the editor toolbar doesn't work at all. this is with the standard editor mode as a default. if it the WYSIWYG mode then does not work. I'm really having hard time trying to figure out how to get over this. anyone has any idea? |
#4
|
||||
|
||||
If you want to disable anyone from putting anything in the textarea, then what does it matter if the editor for the textarea doesn't work? You don't need it to work if you can't use it anyway.
|
#5
|
|||
|
|||
No, I want it to be disabled and set a condition for that, like a check box needed to be checked first to be enabled.
the problem is after the check box is checked, the textarea is not disabled, but the editor doesn't work. |
#6
|
||||
|
||||
Oh. I think you'll need to do some javascript to have the field 'enabled' after another field is checked.
|
#7
|
|||
|
|||
I've done that. but it's not working with editor tools.
so after the check box is checked, the textarea is not disabled anymore, but the editor toolbar is. and this is the problem. this only happens when I remove id="{$editorid}_textarea" if I don't remove id="{$editorid}_textarea" then the textared doesn't get disabled till I check the checkbox and un-check it. only when I un-check the checkbox the textarea gets disabled, but it doesn't get disabled directly when I load or reload the page. Odd! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|