Skip navigation
Markie Mannering
Currently Being Moderated

Duplicating entered data between fields when a box is checked

Jul 22, 2012 7:25 PM

Hello,

 

Sorry, I haven't down a detailed forum search yet; How can I have user-entered data from some fields duplicated or copied automatically to other data fields in the form when/if a user ticks a box. For example, all contact details for a seminar participant are entered, they then check one box, and the participant contact details are copied to equivalent fields in the 'To Be Invoiced' section of the form. Thanks.

 
Replies
  • Currently Being Moderated
    Jul 22, 2012 10:38 PM   in reply to Markie Mannering

    Did you give the fields the same name by chance?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 23, 2012 6:41 AM   in reply to Markie Mannering

    Here's what I use:

     

    //Put this in the CustomFormat script for the 'ToBeInvoicedName' field(s) if (this.getField('SameInformation_Checkbox').value == 'Yes') {

      // Change this field name to match the corresponding field name (e.g. ContactName for ToBeInvoicedName)

      event.value = this.getField('ContactName').valueAsString

      event.target.readonly = true

    } else {

    event.target.readonly = false

    }

     

    // Put this in the Custom Calculation script for the 'ToBeInvoiced' field(s)

    event.value = event.value

     

     

    Be sure to change the names to match your Checkbox and Fields. You will need to change the value in the 'getField' line to the name of the matching entry field (e.g. ContactName for ToBeInvoicedName; ContactAddress for ToBeInvoicedAddressed, etc.)

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points