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
Ana Catarina BritesAna Catarina Brites 

Inputtextarea with styleClass not updating value in controller

Hello.
I have been looking at an unusual situation.

I have a visualforce page with some inputtextareas with a style. When loading the page, it works fine as in getting the values from the controller. When the user changes this values on the page and submits the form, the values are not being set!

The unusual thing is that when I remove the class from the inputtextarea, it works perfectly, but if I keep the class not so much.

Here is an example of a textarea input and the Css code:

 

<!-- Input textarea --> 
<div class="title-form text-bold">Title:</div>
<apex:inputtextarea styleClass="input-textarea" id="msg6" value="{!button.Message_title__c}" rows="2" cols="100"/>

 

When the form is submited I have a script that verifies if the input is not empty.

If someone could help me find a workaround for this I would be very thankful.

Best Regards,
ACB

Vinita_SFDCVinita_SFDC

Hello ACB,

 

Try like this:

 

<apex:page>
<apex:stylesheet value="{!$Resource.TestStyles}"/>
<apex:outputText value="Styled Text in a sample style class" styleClass="sample"/>
</apex:page>

 

I am wondering how are you including the <Div> tag in visual force.

Ana Catarina BritesAna Catarina Brites

Hello Vinirta_SFDC

 

I'm not sure I understand what you mean, I have the CSS code in my page, its goes something like this:

 

<style type="text/css">
input-textarea  {                
	width:332px;
	height:45px;
	margin:0 0 0px 10px;
	font-size:12px;
	-moz-border-radius: 7px;
	-webkit-border-radius: 7px;
	border-radius: 7px;
	border:3px #f1f1f1 solid;
	background:#fdfdfd;
	margin-left: 25px;
	padding: 5px 5px 5px 5px;
	font-family:"Lucida Sans", sans-serif;
	color: rgb(152, 152, 152);
	resize: none;
	line-height: 170%;
}

input-textarea:focus {
	font-size:12px;
	border: 2px solid rgb(206, 181, 57);
	font-family:"Lucida Sans", sans-serif;
	color: rgb(90, 90, 90);
}
</style>

 

The problem is in the inputtext, that is not working with the CSS class.