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
SaintMichaelSaintMichael 

id for input fields

Is there any way to force apex:inputText to keep the id that I give it?

 

This:

<input id="tags" />

 becomes this:

<input id="j_id0:j_id2:j_id3:j_id4:tags" type="text" name="j_id0:j_id2:j_id3:j_id4:tags" />

 Any way to get the ids to stick?

My autocomplete is getting sabotaged by the id issue.

S91084S91084

It has basically assigned the page Id and the form Id to you input tag. When you reference the value in <script> you have to reference the tag as follows:

 

document.getElementById('{!$Component.<pageId>:<FormId>:<tagId>}').value