Copy Code

alex305v 04 Jan, 2016
I have a form that one textbox name=ID needs to be copied to another box name=Group_ID on the click of a checkbox name=CopyID. Sounds easy but I cant figure it out. Help Plz
GreyHead 04 Jan, 2016
Hi alex305v,

Plese set IDs for the elements that are the same as the names then try this code in a Load JavaScript action in the form On Load event before the HTML (render form) action.
jQuery(document).ready(function (jQ) {
  jQ('#CopyID').on('click', function() {
    var id;
    id = jQ('#ID').val();
    jQ('#Group_ID ').val(id);
!! Not tested and may need debugging !!


PS I suggest that you don't use your email as a username here as is publicly visible and may be scraped and spammed.
This topic is locked and no more replies can be posted.