You are viewing limited content. For full access, please sign in.

Question

Question

Capture original field value on final form

asked on August 22, 2019

Hello,

Does anyone know of a way to capture the originally submitted values on a form and show any that have changed on the last form in the process? I'm looking for a way to only have one final form saved to the repository.

Other than saving two copies of the form to the repository - one from the original submission and one from the final task. Or duplicating every field (I have over a hundred) to capture that original value.

Example, on the original submission the Favorite Color is Green. But on a later task it gets changed to Blue. So the final form copy saved to the repository would show that the value for Favorite Color changed from Green to Blue.

0 0

Replies

replied on August 30, 2019

I'm testing with this code but it's showing fields it shouldn't. Can anyone help?

  
    var fields = $(".cf-field");
	var count = 0;
	//var holder =
    fields.each(function(index) {
        var test = $(this).parent();
      if( 

       ($(this).parent().not(".hidden"))
       && ($(this).parent().not('.doNotInclude')) 
       &&($(this).find("input[checked='true'],input.singleline,select,textarea").val() != '')

       ) {
      
	      count += 1;
	      $('.putValueHere textarea').append(count + ') ');
	      $('.putValueHere textarea').append($(this).prev('.cf-label').find('span').find('span').text() + ': ');
	      $('.putValueHere textarea').append($(this).find("input[checked='true'],input.singleline,select,textarea").map(function() {
     		   return $(this).val()
     		   }).get().join() + ' '); 
      
     }
    });

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.