Looking for gravity forms custom code

  • You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

  • You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

phukit

Well-known member
Trusted Uploader
Sep 30, 2018
191
315
63
Hi

Can anyone here help?

I am using gravity forms and using the predefined address fields/section.

there is no input mask for the zip/postal code and I am looking if someone can provide a snippet to achieve this.

Thanks!
 

phukit

Well-known member
Trusted Uploader
Sep 30, 2018
191
315
63
After talking to the gravity forms team, it is not possible to add an input mask to the address fields.

This only applies to a single text field, that's why the code wasn't working.
 

phukit

Well-known member
Trusted Uploader
Sep 30, 2018
191
315
63
I have finally developed a solution for input masking any form or input not just gravity forms.

Here is the solution if anyone is interested:

Code:
You don't have permission to view the code content. Log in or register now.
 
Last edited:
  • Like
Reactions: 666

frizzel

Well-known member
Trusted Uploader
Jun 13, 2019
458
232
63
Wherever my imagination takes me
I have finally developed a solution for input masking any form or input not just gravity forms.

Here is the solution if anyone is interested:

Code:
You don't have permission to view the code content. Log in or register now.
It's indeed in the description of how to use the jQuery MaskedInput plug-in that Gravity Forms uses, so it's very strange that they didn't suggest that as a solution.

As '.mask' is not part of core jQuery, it doesn't work for any form, you'll need a jQuery mask plug-in present or linked, such as the one above or the more recently updated jQuery Mask Plugin.
 

phukit

Well-known member
Trusted Uploader
Sep 30, 2018
191
315
63
It's indeed in the description of how to use the jQuery MaskedInput plug-in that Gravity Forms uses, so it's very strange that they didn't suggest that as a solution.

As '.mask' is not part of core jQuery, it doesn't work for any form, you'll need a jQuery mask plug-in present or linked, such as the one above or the more recently updated jQuery Mask Plugin.

Thanks for the clarification.

I am surprised too that they never mentioned this because its an easy solution.

Thanks
 
AdBlock Detected

Hi bro. Can you please help us?

I know the ads sometimes are too annoying and you want to use Adblock. But I think you can support us by adding Babiato to the whitelist. It will help us and our community.

Thanks for your help!

I've Disabled AdBlock