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
SlanganSlangan 

Visual Force page with multiple input fields not saving.

Hello everyone & thanks for taking the time to read this. This forum is amazing and I am humbled by the knowledge here.

 

I have created two visualforce pages. One displays inline on the opportunity in a collapsable section (it is my 'display' page). The other is an 'edit' page with a form that allows you to edit the fields on the display page.

 

My problem is this: the save button works fine if you update only one or two of the fields. It updates the fields and returns you to the main opportunity where you can then see the changes on the 'display' inline visualforce page. However, if you update more than two fields at once, the save button merely reloads the edit page and although it does not delete any information, it does not save it either.

 

I know the answer is probably really simple, but I am pretty stumped here. All of the input fields have unique id's.

 

Any help/advice/guidance is greatly appreciated - thank-you again for taking the time to read this!

 

Shannon

Best Answer chosen by Admin (Salesforce Developers) 
jwetzlerjwetzler
Sounds like you have some validation errors on your page.  Put the apex: pageMessages component somewhere on your page and see what the messages are.

All Answers

jwetzlerjwetzler
Sounds like you have some validation errors on your page.  Put the apex: pageMessages component somewhere on your page and see what the messages are.
This was selected as the best answer
SlanganSlangan

Yup, that did the trick. Turns out my apex:inputTextarea only allows a max of 250 characters and since it is meant to enable users to enter whatever they like, if they enter more than that it is creating an error.

 

Thanks a lot - simple, but great advice.

 

If I can impose, may I ask you one more question?

 

Is there a way to define the character limit on an inputTextarea? I see you can define rows and columns, but can you increase the character limit?

 

- Never Mind - figured it out (the original field had a limit on it). Thanks again for the help!

 

Message Edited by Slangan on 07-06-2009 10:43 AM
jwetzlerjwetzler
You could use some javascript to check that yourself.  If you're binding directly to a field you can use apex: inputField which I think should do that automatically.
SlanganSlangan
You are the best. Thanks again!