Support » Plugin: Masks Form Fields » Works with Contact Form 7?

  • Resolved Marlimant

    (@marlimant)


    Hello, and thanks for the plugin.

    Can you help me with an example please of what I have to write in the form tab of CF7?

    I need a money field where the user fill the amount of, for example, 37500 and the field shows $37.500.- (In Chile we do not use decimals like $37.500,00).

    On the other hand, I need a second field where the user fill the digits of his chilean ID card. For example, the user write 58995271 and the field must to show 5.899.527-1. Another example of the same ID card field: the user write 45311459k and the field must to show 45.311.459-k

    Thank you and I hope your answer can help other novices like me.

    • This topic was modified 6 months, 2 weeks ago by Marlimant.
Viewing 2 replies - 1 through 2 (of 2 total)
  • I have fix my problem using this in functions.php:

    function custom_masks_form_fields() { ?>
    <script type="text/javascript">
    jQuery(document).ready(function($){$("input.my_class").mask("00.000.000-A"), {reverse: true};});
    </script>
    <?php }
    add_action('wp_footer', 'custom_masks_form_fields', 111);

    Then, in CF7 I pasted [text text-772 class:my_class]
    How can I mask a field with a variable characters in first 2 digits. For example, the user can fill an ID number of 9 digits or 8 digits. For example: 4.456.235-k and the posibility of fill a ID number with more (9) digits, like: 18.435-754-k?

    Thank you.

    I found out the best way to generate a field to chilean ID card is using this code:

    function custom_masks_form_fields() { ?>
    <script type="text/javascript">
    jQuery(document).ready(function($){$("input.rutt").mask("##.000.000-A", {reverse: true});});
    </script>
    <?php }
    add_action('wp_footer', 'custom_masks_form_fields', 111);

    I hope this could help someone.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Works with Contact Form 7?’ is closed to new replies.