Duplicating custom module field to another module

Hi,

I am trying to duplicate the text that is entered within a text field on a custom module to a second custom module (I have another custom module on the same template that I’d like the text from that field to automatically appear again).

For example - the main custom module has a text field for ID and they enter 123446. I’d like 123446 to appear automatically in my second custom module so the user doesn’t have to enter this twice on the one page. I’ve tried including the same snippet but it does not display.

Any ideas/suggestions? Thank you!

@Ben_Taylor, if it is just some text, you can use a pretty simple jquery script to append the text

example:

//this is from the first module
<h3 class="productID">Brilliant Copy</h3>

//this is in module 2
<h3 class="productIDredeux"></h3>

// add this to the js part of the second module
$('.productID').text( $('.productIDredeux').text() );

This is going to replace any text that is in that field for the second module. Just keep that in mind :slightly_smiling_face:

@dennisedson Thank so much! that works perfectly
16x16_smiley-happy.png.png