Hi Dear @ajith86 ,
Thanks for your inquiry.
Please, add this code to the Custom JavaScript section of the form and check the result.
var str = “HELLO WORLD”;
var res = str.substring(0, 4);
Please, confirm if you were able to achieve the desired result.
Best Regards,
Mane
Hello Mane
That does not seem to have worked..
a) My first field is “First name” and my 6th field is First name again ( on page 2).. I want to send the First name entered in the first field to the 6th field without username having to type in again.
b) I want to create a unique reference for each person which is the first 4 letters of surname plus year of birth. This then needs to appear in the field called unique reference as a read only display.
Can these be acheived using formmaker?
BW
Ajith
Dear @ajith86 ,
Will you please send us the link of the page where the form is published? This will give us more details about the structure.
Or you can provide us with the screenshots, to make sure we don’t misunderstand.
Thanks for your understanding.
Best Regards,
Mane
Thank you Mane
Here is the link
https://pab2u.com/cmc-alumni-registration-test/
a) I want to make an input for the “reference for your cheques…” as a read only field created from surname and batch in the format XXXX9999…
( Can you calculator work with numbers and letters?)
b) On page 2 First name and surname should come prepopulated automatically from first name and surname on page 1 – again read only field..
Any suggestions?
Ajith
Dear @ajith86 ,
Please, check and confirm.
For First Name* to *Person 1 First name
jQuery(‘#wdform_2_element8’).on(‘input change’, function() {
jQuery(‘#wdform_9_element8’).val(jQuery(‘#wdform_2_element8’).val())
})
for Surname* to *Person 1 Surname
jQuery(‘#wdform_3_element8’).on(‘input change’, function() {
jQuery(‘#wdform_10_element8’).val(jQuery(‘#wdform_3_element8’).val())
})
for Reference
jQuery(‘#wdform_8_element8, wdform_3_element8’).on(‘input change’, function() {
jQuery(‘#wdform_88_element8’).val(
jQuery(‘#wdform_3_element8’).val().substring(0, 4) + jQuery(‘#wdform_8_element8’).val().substring(0, 4)
)
})
Best Regards,
Mane
Thank you Mane,
Where do I enter this code?
Ajith
Dear @ajith86 ,
Under the Form Settings you will find JavaScript option. Please, add there.
Here is a screenshot to help you.
Best Regards,
Mane