Skip to Content
author's profile photo Former Member
Former Member

Using REQUEST->GET_FORM_DATA for two separate events

Hi All,

Imagine the following scenario:

A BSP form is loaded with pre-populated form elements (i.e. some of the text fields are pre-populated from back-end using onInitialization event).

A user changes the content of HTML form (i.e. enters some new values in text fields) and hits the save button. onInputProcessing event is triggered.

What I am trying to accomplish is to get two sets of data using REQUEST->GET_FORM_DATA method.

1) When the form loads (but before user has a chance to change form content).

2) When the form is submitted with new values.

The reason is that I want to compare each data set (initial and modified) to create a "log" of what fields have been changed.

Did anyone ever face a similar task? Thanks in advance for all help.


Roman D.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Feb 09, 2005 at 07:57 PM

    In the oninitialization event move the current values to some hidden form field and in oninputprocessing read the hidden field values and the user entered values from the input fields using REQUEST->GET_FORM_DATA .



    Add a comment
    10|10000 characters needed characters exceeded

    • There is no standard way to get "old" and "new" values, as there is always only the "new" value submitted by the form.

      Placing the "old" values into hidden form fields sure works, but is just creating an overhead in the amount of form elements, so you might be better off placing these "old" values on the server-side, either application class, model, server-side-cookie, ...

  • Posted on Feb 10, 2005 at 09:27 PM

    Hallo Roman,

    There is one idea, which I have seen CRM colleagues do. But this is for browser. You should do some reading up of the "defaultValue" attribute on input fields from some website on HTML dom. What this script does is find all input fields, and see which value is not the way it was before.

    function htmlbSubmitPre(){
     var formID=document.getElementById("myFormId"); 
     var allInp=formID.getElementsByTagName('INPUT');	
     for(var i=0;i<allInp.length;i++){
      if(allInp<i>.type=='text' {

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.