Forums

inputmask

Gatsman 24 Oct, 2015
Hi,
I got a form that has among others 2 input fields that use a date inputmask dd/mm/yyyy
The form can be duplicated on click with jQuery but the inputmask does not work for the new created fields.

Is there anything i can add to the duplication code that can reload the inputmask everytime a new line is rendered?

- John
GreyHead 24 Oct, 2015
Answer
Hi John,

I think that you have to initialise the mask on the new input when you duplicate the element. If you have the mask set as a data item then jQuery("#element_id").inputmask(); should be enough.

Bob
Gatsman 24 Oct, 2015
Geat thank you Bob,
I changed it to .element_class since the element_id gets updated for every new row.

- John
This topic is locked and no more replies can be posted.