Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
VFE onItemChange event
System
I have to set a flag in the DCR if a user updates a VFE-inlined textarea. I am using an onItemChange event, but it fires when the user does not change the content. Apparently the VFE field has the focus when the form loads, then they click on some other item and the onChange happens even though they didn't make a change. I figured I could take a copy of the value onLoad and compare it to the current value in the event handler, but again, even though the user did not make a change it appears that the value of the field has changed (some linefeeds and such). The DCRs were written from an import process and VFE seems to be reformatting the HTML. If I make the external-editor-inline f, then the onChange only happens when they press "OK" in the callout (even if they didn't actually make a change). Lame, but acceptable I guess, but making it a callout might not be acceptable to the users (there's only one VFE in the template, and that's basically all the users work with).
How can I execute logic only when the user has changed the value of a VFE-enabled field, whether inlined or callout?
Find more posts tagged with
Comments
Migrateduser
Or alternatively, onLoad can I fire off the VFE scrub process, then take a copy of the data? That way I should be able to detect user changes. How can I logically trigger the VFE scrub or whatever it's doing?
Migrateduser
Unfortunately, because VFE changes the HTML content of the data, formapi treats it as a change eventhough the user did not change the data.
In 6.x, you can listen to the onFormLoad event to trigger the VFE scrub.
--Daniel
Sri
You can do scrub of VF content onLoad, but please be aware of the performance issues as the work involved in scrubbing everytime onChange event gets fired is not trivial and can add overhead.
I know this is of no help immediately, but I think it'd be good to file a feature request so that VF doesn't alter the content if the user actually hasn't changed anything.
Sri