function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
prbprb 

How do you access an HTML form field in APEX?

If I create an HTML field (not using the apex page tag library "apex:inputTextarea"):

<textarea id="_editorContent" name="editorContent" dojoType="dijit.Editor" >
              {!content.body__c}
</textarea>

why would this not work:

ApexPages.currentPage().getParameters().get('editorContent');

I get a blank value.
Is this call only for URL values?
What is the correct call for a form field?

Thanks

prbprb
sorry this is a javascript error not an apex error.
:smileysad:
devNut!devNut!
This "ApexPages.currentPage().getParameters().get('editorContent');" is for url parameters.

Why don't you want to use the "<apex:inputTextarea" tag?
prbprb
I was using my own HTML tags so I could extend the DOJO rich content editor w/extra plugins.
The rich editor available with APEX is too limited.  HTML is not much use without links.
APEX strips out parameters it doesn't recognize, such as dojoType etc.
I think it should allow anything through that it doesn't recognize but that's just my opinion.
So long as I can access form fields in this manner I'm happy.
Cheers