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

How can I make the fields on my VF page dynamically editable?


So I placed some fields on my VF page with a field set using:


<apex:repeat value="{!$ObjectType.Lead.FieldSets.QDR_Information}" var="f">
<apex:outputfield value="{!Lead[f]}">


The only problem is that becuase I am using <apex:ouputfield>, the fields are not dynamically editable via double-click.  I want the same functionallity that we get with the standard UI.  Is that possible?

Andrew WilkinsonAndrew Wilkinson

Add inlineEditing...your controller would need to be an extension to the standardcontroller or you will need to use the standardconttroller.


<apex:outputField value="{!contact.lastname}">
                    <apex:inlineEditSupport showOnEdit="saveButton, cancelButton"  hideOnEdit="editButton"       event="ondblclick"  changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>