A Better GForms Repeater Example

The Gravity Forms repeater field example is helpful, but has multiple issues that don’t make themselves apparent until you try to implement it.

Thankfully Giorgos Sarigiannidis has a better repeater example that solves some of the most troubling issues of the repeater field.

Here is my example of the same idea, but using a different form as the fields in the repeater. This allows the client to update the fields in the repeater themselves.

 

Gforms doesn’t have a counter system built in yet so if you want to use a counter with your repeater ( ex: Attendee #1, Attendee #2, etc… ) here is some SCSS code you can use to accomplish that.

This will look something like this:

Prevent Gravity Forms From Saving Information

We recently had a client request that none of the forms on their site actually store the information in the database since some of it was potentially sensitive. They did however need to save the entry time and the email.

The solution we came up with was to allow Gravity Forms to work like normal and clear any information that wasn’t an email address.

Thanks to the Gravity Forms Utility plugin I was able to steal this code out of their plugin.

If you would like a plugin to handle this in a more controllable fashion I definitely recommend the Gravity Forms Utility plugin. That plugin will allow you to have control over each field on all forms and “redact” that information so that it is not saved to the database.

Gravity Forms Encryption

Obviously security and encryption is a long topic and there are a great many posts out there about various security measures. Skipping over all of that here is some code you can use to quickly setup a “secure” / encrypted entry for Gforms.

Now all you need to do to make sure your gform is secure is attach a custom class of “secure” (or whatever you want) to the input field of your choice.

Obviously this is not everything you need to secure information, but this is an important piece of the puzzle.

Replace Gravity Forms Selects

I had an earlier post about cross browser safe select replacements. This is a function which replaces the gravity forms plugin select drop downs with those cross browser safe drop downs.

CSS styles. You will need to edit to fit your needs.