Code

Discussion on Gravity Forms Encrypted Fields

Discussion on Gravity Forms Encrypted Fields

Cart 3,480 sales
Recently Updated

PluginOwl supports this item

Supported

This author's response time can be up to 5 business days.

704 comments found.

Hi,

I am currently transferring from Gravitate Encryption to Gravity Forms Encrypted Fields. I have a site with 400+ forms and ~300,000 entries. I have written a function to completely decode the previously encoded entries via a Gravitate Encryption function. I was able to have it run through the gf_entry_meta table (100,000 rows at a time) and decrypt all entries in batches.

I currently have the plugin installed and running and I need to encrypt all the entires again. Unfortunately to encrypt all the data again through the plugin interface would be very slow and a bit quirky.

Is there a function that I can fun outside the plugin to take a string and encrypt it? Gravitate Encryption offers a $decrypt_service = new GDS_Encryption_Class(); and $decrypt_service->decrypt($row->meta_value); Just looking to bypass the GUI and run the encryption on the database table itself.

Thanks, P

I am using your plugin. I set up a custom cron job to run through the gf_meta_entry table and used the “gfef_text_encrypt” function to encrypt each entry. All the data that was converted was un-encrypted to begin with.

The odd thing is that all meta in the database does have the right encoding (IE: GFEncrypt: aa91545966defec7b1dce6ea01TGRQdmZPZ0pGbWJYSU8yOHVtT0lSWWRwalRiY2tNRkk0RFdYaWpoYlpxST0=) but when i go to view the data within the entires section is displays it in differently (IE: enx1:QYkDZwXwsjJVJdWTs4aRRzm+suqwrH+1cWzE+f1u/FjmYBA0CI…).

Oddly enough too is that the email field within that form i just referenced is in the GFEncrypt: xxx format, but it is the only field. All fields besides one are single line text fields.

Gotcha.

Once you carefully set up the plug in following the numbered instructions you should be able to view your data as long as it was encrypted properly according to our plugins supported field types etc.

With running encryption from custom code it’s possible to encrypt basically anything, but I see you are using the custom “string” encryption to encrypt field data now. It is best to do this using the built in batch encryption after fully setting up the plugin to be sure that all field types are encrypted properly and of supported type. I see you have an extraordinary amount of preexisting entries and this would be slow overall. In general if you are not running new data processes on the old data is best to just archive it and start fresh with new entries moving forward as far as storage. but if using the dev encryption for fields to re-encrypt quickly,  just be sure the field types are supported by our plug-in for field data encryption.

Thanks for the explanation. I had missed a check to see if the field has been set to encryptField. I will add this flag and try again. Thanks for the explanation and the quick replies. Really appreciate it.

Is there a way to not show field values for anyone (only show encrypted values) until a user types in both the encryption key and password each time?

For example, the user would need to be logged into their account AND also know the encryption key and password to view the real value.

That way, if their account is breached or accessed by someone else, then they wouldn’t be able to view the real values since that hacker wouldn’t know the key and password to view it.

Hello

Please read on the asynchronous encryption mode. This requires both a logged in user with also entering single encryption password.

This is built in to the plug-in, and is enabled in the encryption type selection options further instructions.

It does come with some caveats due to no decryption being possible without logged in user and entered pass, so anonymous user notifications etc need to be accounted for and the instructions go over this. :)

Is there a way to maintain the encrypted fields value when an entry gets edited? I currently have an application form with an encrypted field for a SSN and the form generates a PDF. The SSN is encrypted in the WP back end but I do have it visible on the pdf. My issue is that the client is editing and updating the entries and in doing so the “Encrypted Field Restricted” value is overwriting the actual SSN. Is there a way to protect this field from being edited and maintain its original values?

Hello

The encrypted values are not updated unless they are actually changed when editing entries using the standard Gravity Forms entry edit interface.

..This however depends on the way the entries are being edited. The plug-in or custom solution they are using to edit entries must adhere to gravity forms same method of editing. If it saves over all data regardless of if it was changed or not then it will overwrite the encrypted data strings with whatever is in the field during the edited submission.

Suggested solutions:

1. Have them Use the gravity forms entry editor 2. Use a compliant entry editing method and/or only edit the fields that need editing so the restricted field data is not displayed or overwritten with the edit. 3. If appropriate, give the editor field view permissions in the existing setup so the information is displayed or hidden decrypted and just submitted for encryption again. 4. Write a small snippet to skip over saving encrypted field data if the submitted data matches your restricted display for that form. (This would allow new data entry on original submission or changing forms data with new field data on edit, but if the restricted display is submitted it would just keep whatever data is already there if anything.) This solution has been suggested by one of the devs who has it posted for a possible additional selectable plugin option for later release. Basically this would prevent the exact match of the restricted display from being submitted and actually saved initially, or over any existing or blank data at any following point if turned on.

Hi!

After a re-design, i cant activate my license. https://prnt.sc/k3Oy_H9sR7Tq

- dev license is deactivated. - the /en/ installation is no more (deleted for good)

Best regards :)

Hello

Are you using the latest version of the plug-in? 6.1.7 If not please upgrade.

You can click our user name to send us an email via our author page contact form and include the purchase code there in private so we can assist.

I’ve written to you. Thanks!

We have a mysterious issue where encrypted entries are being permanently deleted. When we test a form submission ourselves, it works fine. But we have a real user who has tested for us twice, and we receive the notification email with her unencrypted data and file attachment. But the entire entry is gone from the website. It’s not in the trash nor in the database. The form has both encrypted and encrypted fields, as well as a file upload field. The form is set to delete files after email, but we do not have it set to delete the entries. Here are our plugin settings:

Admin-Area Viewing Only = checked Delete Entries After Submission = BLANK (no ids or any text has been entered here) Delete Only File Uploads After Submission = 12 Attach File Uploads to Notification Emails = 12:Accounting Notification

Anti-spam honeypot is turned on for the form and Honeypot is set to “not create an entry” if it’s flagged as spam. Could this be related? We receive the notification email with the entry data (which includes and entry ID and link to the entry) which is not supposed to happen if the entry wasn’t created. There are no errors in the log. However we did not have gravity-specific error logging turned on at the time she submitted.

Do you know why an entry could be entirely deleted in this setup? Yet the entries are not deleted in our personal tests?

Oh, and yes—I did update to 6.1.7 yesterday, before I submitted my tests. Was there anything in that update that would relate to this issue?

Hello

No. Updating never deletes any data. The most that can happen is if for some reason you are using a custom website key against all instructions, the key can fail to regenerate, and the auto key will take over for any new entries. A custom key needs to be checked and potentially re-entered after every update or site migration etc. which of course leads to failure to do so. This would result in your old encrypted data under the custom key not showing up in your entries displays, but the entries themselves would still be displayed and any non encrypted data in them would still display normally. Changing the key back to the custom key would display both again.

Again though, this wouldn’t ever delete any data from the database. It would just be sitting there encrypted and would read/display correctly again when the custom key it was encrypted under is entered again. Deleting data has to be done quite deliberately.

Ok, thank you. We are using the auto key. And sounds like spam filters are not the issue. Will keep digging.

I am Sharing an issue with how to set this up. I have tried all the settings but cant get what we want. I have 3 fields they we do not want to show in view entries because data is added to a PDF that is password protected. We set encryption on, and to encrypt after submit which fixed the pdf part but if a user is set for access they can still see private info in the list of entries. We tried the hide option instead of encrypt but that breaks the pdf plugin. Any help would be great. We also tried remove field and that removes from the PDF as well.

1. We have private fields we want in the PDF but not in the admin, or view entries screen

{gfef_decrypt_9} RSP Test Entry ID: 1511 Entry link: https://ourdomain/wp-admin/admin.php?page=gf_entries&view=entry&id=23&lid=1511 {gfef_decrypt_ALL+} © My Website

Man we would write this doc very different. We were able to get working by adding

ALL:ALL+, ALL:ALL, ALL:ANY, ALL:ALL+:U, ALL:ALL:U, ALL:ANY:U, ALL:ANY:X

to settings

Hello

Yes, the merge tags being unlocked is key to using them. This is noted in the template instructions.

Please feel confident to edit the template as needed for your output. You mentioned you are not developers, but you can just open in a text editor and remove/add or change any text or used merge tags as you would like with a few basic html paragraph tags exactly like in a gravity forms notification or normal WordPress content area. It is really meant as more of an example to be edited to your needs, but again, it does not require this in order to function.

We just updated to the latest version (6.1.7) using AUTO KEY and the data is no longer showing up. Most of the comments I’ve found with this issue you describe as problematic when using a custom key. This is not the case for us. The new key is present in the plugin settings and I have a copy of the old key, but the new key doesn’t work. What should we do?

I got the data back by replacing the auto key with the old key. How do we switch it back to using an auto key as it’s recommended by you?

Hello

Did you migrate the site or clone it to another site? The auto key changes with every WP install, so it is unique for every site. It also does not change unless this was done or your core WP files were changed. So when using the auto key it is the same through any updates or restores etc without issues.

There a a couple ways to switch to using the auto key instead of a custom key. The setting tells you what you are using.

1. just export your current form data and store the CSV files securely for If you ever need them. Then just switch the key. All forward moving entries will be readable. Backwards will be readable in saved export, or you can switch the key and read on site when forms are offline if necessary.

2. Use the manual decrypt/encrypt tool at bottom of settings page (follow ALL instructions carefully, this can destroy data if used incorrectly and would have to recover from backup). Manually Decrypt all current entry data using correct keys for it. Then change the key to auto key. Manually re-encrypt all current data under the auto key. Then all data forward and back will be under auto key.

Yes, I am trying to find out if this will encrypt attachments uploaded into the gravity form. I have a simple form that requires a pdf to be uploaded into the form and sent to us. That pdf will contain sensitive information that I need encrypted. Will this plugin do that??

Hello

No the plug-in does not encrypt email attachments, or file upload in general. But you should use it to protect the data you are collecting and storing that is sensitive regardless of what you do with sending it out in pdf notifications/ file storage etc.

It does not do this that because There are already solutions available for that. The ability to have file uploads go to Dropbox etc offers encrypted file storage, and gravity pdf already offers explicit password protected pdf encryption for the attached PDFs in notifications. This plugin is a solution for the data that stays in your WP database.

I have a site and I changed the URL and I cannot deactivate it on the old URL. The old site was divsol.flywheelsites.com and the new URL is divsol2023.ornl.gov. I tried to follow the instructions for deactivation:

deregister a license from within one of the registered websites. Settings->GF Encrypted Fields->Licensing is near top of page.

But there is nothing about “Licensing” anywhere on the settings page. Please help me get this working again. It is urgent.

Thank you.

Hello

The old site must be running a very old version previous to self deactivation. Please send us an email (click our user name and use author contact form). And include your purchase code and site to deactivate.

DO NOT list these items here publicly. Only send them on the B secure contact form :) We will deactivate for you.

Hi,

I’m trying to switch to a different license code and enable Async mode (testing on staging atm). What I did was trying to decrypt fields using the Form encrypt/ decrypt tool and then deregistering the license to input the new code. But after that, my form fields are still restricted. Can you please advise?

Also, is there a way to decrypt all the forms in 1 go instead of 1 at a time?

Thanks,

You have to enable turning on asynch again. It’s in the instructions for encryption type. select open ssl first and save, then enable asynch. As you go through encryption option tour instructions near bottom there is a button to “allow asynch”

Thanks. When I opened the instructions for encryption type, this is all the info I see:

“Data encrypted under one encryption type cannot be read under the other.

If switching encryption types it is strongly advised to use the “Encrypt/Decrypt Form Entries” tool to decrypt all past entries, and then switch encryption types and re encrypt them with the new encryption type.

NOTES: - Mcrypt is scheduled be depricated from PHP core as of ver 7.2+, but may still be available if using an MCrypt add-on. - OpenSSL is strongly recommended and may be required if you are currently running PHP 7.2+, or will be in the future.”

Before, I do remember seeing a button to confirm enabling async. I have chosen openssl and clicked save but still not seeing the button.

What version of the plug-in are you running? That text is from a very old version and likely before asynch existed as an option.

I would recommend you download and update the plugin to the latest version 6.1.6 from your envato account. You can also use the envato market plugin to do automatic updates on it.

I’m having a problem with the Paragraph Text field when receiving the notification email.

If the submission has two or more paragraphs in that field, the notification email will always send it all together as one paragraph. Is there any way to prevent this?

Thanks!

Hello

Thank you for notifying us of this. It has been fixed in version 6.1.6. Please update as soon as this version is released (expected tomorrow) to have your paragraphs working properly in the decrypted tags. if you have your Envato account set to notify you of updates for this item you will receive an email when it is updated :)

Changelog 6.1.6 * Fixed textarea field displays in decrypted merge tags to inlcude the line breaks as entered.

Lockout settings password will not work. I entered a password, copied it to my hard drive, pasted it into the fields, twice, to confirm, and hit save. Now the lockout screen says my password is incorrect.

Help please.

As a heads up for anyone with this issue. Your password Max character limit is 16. If you try and use a 20 or 24 or whatever, it will truncate the password to 16. If you get locked out, use only the 1st 16 characters of your password. It will likely work to get you back in before you have to uninstall, reinstall and reset the entire plugin. DEVS, why can we only use 16 characters, is this a limit of the database entry?

Hello

Yes, the Lockout Settings Password input on the settings page is actually limited to 16 characters for any input into the field and also for the the duplicate re-entry field to verify the password.

The instructions for the password field also specify to use 8-16 characters.

I am not sure how you would be able to input or submit anything longer than 16 characters, but assuming it truncated anything pasted in to the first 16 characters, then the same first 16 characters would be used to unlock the settings page.

The input for unlocking the page with the pass does not have a 16 character limit but allows 32 chars. This is easily changed, but from our standpoint anyone without the proper pass actually submitted on the settings page is free to be greatly slowed by the larger char limit for entering wrong password combinations.

We found another issue: The encryption after submission does not work anymore. The fields are already encrypted, before sending the notifications.

Hello,

The field data is protected during notifications merge tag output if it is set to be encrypted. This does not mean that the data is actually already encrypted.

Please follow the setup instructions to use the decrypted merge tags to allow protected data to pass through the notification. I assume per your last post this is what you are trying to get the ranking field to display properly, and are trying to use a standard merge tag to pass the encrypted field data during notifications set to encrypt after submission processing. Again, the data will be restricted with the restricted display when using a standard merge tag even though it has not yet been encrypted.

Again, effectively your options are to either wait for us to see about adding support for ranking fields (not currently supported) to display properly, or just create a notification using individual tags for each field. Doing this you can mix normal merge tags for non encrypted fields and decrypted tags for encrypted fields.

Hi, we found out, that the plugin is not compatible with the official “Survey Add-On” from Gravity forms.

We do not need to crypt the fields of this plugin, but how can I view the entries, when I use this command in the notification mails: {gfef_decrypt_ALL+}

When I use a ranking field, then I get some wired infos like that: grank7845fb929,grank70ad0b286,grank7bcf08fbf,grank752cb3514

Is there a shortcode, where I can mix encrypted and not crypted fields within one tag?

Hello

While it is unclear what you mean by incompatible, I can say that the tag you are using returns both encrypted and non encrypted data. If the ranking field is not returned properly we can look into this to try to add support for its display. You can also always create custom notifications using individual tags to return each field.

Hi – Does this plugin allow for encrypted values to be passed from a third party to a gravity form via a query string and then be decoded without the user being able to change the query string values? For example, can I generate a URL with encrypted query string values in my CMS to allow a customer to be taken directly to a gravity form with certain fields pre-populated? ie www.mydomain.com/gravity_form?field1=Hx543kvG&field2=kxFEyVi5d3 etc?

Hello

This could be set up yes, we have done this previously for projects, but this is not part of the main plug-in functionality at all to be clear. You would have to do some custom programming to use the same encryption on the 3rd party end to be able to send it, and then write a custom function in a gravity forms filter previous to the form rendering to decrypt and fill form fields.

However, as a casual suggestion, you may want to look into simply sending HTTPS post requests to open the Gravity forms page and send the data via post variables without the explicit encryption since https post data is implicitly encrypted already in transit between the parties and while the variables are not directly in the query string, they can be accessed easily inside the same GF pre render folder hook to prepopulate the form fields.

If the data is sensitive it should be encrypted at rest in the end always, but again.. you might be able to get by (pending what your actual level of security needed is) without the explicit encryption to pass data between sites assuming your sites are TSL/SSL/HTTPS already. For observation, this is the same implicit passive encryption in transit that the end user and you rely on for people to enter their data in the first place to any website. The HTTPS/TLS encryption protects the data in transit, so you are actually double encrypting it in transit between parties by sending explicitly manually encrypted data that then has to be manually decrypted on the other end.

It is certainly worth reading up on if the basic data transfer encryption built in would already suit your needs. There are some general differences in terms of ease of use etc., and of course another explicit encryption layer is safer, but https data transfer is generally considered acceptable for most data entry etc.

Here is an article on the HTTPS protocol and what protection it offers in data transfer.

The query string is also sent encrypted, but I advise against this method and instead refer to using the POST method to pass variables because the post variables are not directly retrievable by looking at the URL should someone hit the back button etc, and they are the same method used to pass the field data as variables to next pages , submission etc within gravity forms itself, so effectively your data is just as secure being passed this way over HTTPS as it is being filled into and submitted with the form via HTTPS.

https://https.cio.gov/faq/
Here is a couple simple snippets to show how easy this is to do using a prepopulate filter in gravity forms. The field must be set to allow to be populated dynamically, and use the parameter name to match the functions you write. drop functions in your child themes functions.php file or wherever suits you. Our auto formatter plugin https://codecanyon.net/item/gravity-forms-auto-formatter/19513275 does a great job of easily making fields read only and non clickable for the user ..among many many more awsome features, and would help you be able to make it so they couldnt change it if you are displaying the data, or you could make the fields admin only to not display them to the user and prefill them this way. Full documentation here: https://docs.gravityforms.com/gform_field_value_parameter_name/ add_filter('gform_field_value_secretDataOne', 'populate_secretDataOne', 10, 3);//set field to populate dynamically and set parameter name to secretDataOne function populate_populate_secretDataOne($value, $field, $name) { if ($field->formId == 1) { //replace 1 with your actual form ID number to narrow this function down to run on a single form, or remove the if statement to run on all forms return isset($_POST['secretDataOne'] ) ? $_POST['secretDataOne'] : '';//Use POST data if it is set or returnempty string } return $value; } add_filter('gform_field_value_secretDataTwo', 'populate_secretDataTwo', 10, 3);//set field to populate dynamically and set parameter name to secretDataTwo function populate_populate_secretDataOne($value, $field, $name) { if ($field->formId == 1) { //replace 1 with your actual form ID number to narrow this function down to run on a single form, or remove the if statement to run on all forms return isset($_POST['secretDataTwo'] ) ? $_POST['secretDataTwo'] : ''; //Use POST data if it is set or returnempty string } return $value; }

As a note we DO NOT assist with custom development, but love to be helpful, so hope this helps :)

Trying to figure out how to use this and the videos will not work. What am I doing wrong?

If you cannot get link to YouTube direct please send us e mail by click on our user name and submit contact form for links asking. We can send direct links in reply.

if i go directly to youtube it plays but only audio the screen is green

Hello

Interesting. We can assure you the videos are just normal YouTube videos. I am not sure of why the player is having issues on your end for these specific videos. Have you tried clearing your browser cache or viewing from a different computer? You may need to contact YouTube directly for help in why their service is not coming through for you to view the videos.

Hello- Can you please tell me if exported data is encrypted? For example, are exported excel files password locked? Any other security details you can provide regarding the security of data after it’s collected and during distribution would be greatly appreciated.

Logged in users can read and export data as readable just as you normally would. It’s up to the distributor of the export or manual notifications to only distribute what you want to to whom you want to. You can configure different notifications or exports to only contain certain data. You can also use gravity PDF to explicitly encrypt pdf exports with a password, and/or WP PGP mail and explicitly encrypt outgoing email notifications (this is entirely independent of our plug-in)

In short, The data stays encrypted in your database, and authorized users can send it or use it unencrypted where and when you’d like. Your own data security policies around your site and hosting would inform you of its security beyond this.

I was hoping to use this plugin to encrypt the values in dropdown lists and radio buttons prior to their display on screen when users are filling out the form, so that anyone viewing the HTML source would not be able to see the real option values. Can your plugin do this?

Hello

You would need to write a custom solution for this. Our plugin is not design from box to do this.

I suggest you use an empty text field which is admin only on the form and then use a snippet that takes a set of arbitrary public values from your drop down or radio field and fills the text field out with the actual information you need but do not want t show the front end users.

So if they select #1 in the drop down .. you text field is auto-populated with your secret #1 info. f they select #2 it populates with secret #2 info .. etc. you can use the gform_save_field_value filter to do this easily. Heres a sample snippet. change it to your needs, and note that we do NOT assist with custom development. any help you need using this or changing it is up to you or your devs. this function runs before encryption so you could still encrypt this value in the DB by turning on encryption for the admin only field. :)

// PLugin Owl secret admin only value saver function add_filter('gform_save_field_value', 'Plugin_Owl_selction_to_secret_value', 9999999, 4); function Plugin_Owl_selction_to_secret_value($value, $lead, $field, $form) { $form_id = rgar($form, 'id'); //get form id if ($form_id == 4 && $field->id == 14 && !$value){ // check for correct form id "1" and correct field id "14" of the admin only text field to fill out $location = rgar($lead, 1); // get dropdown or radio field vlaue change the "1" to match your field id $price = 'my default secret value'; //this is the default value of the text field switch ($location) { //switch based on drop down or radio field selction where selection values are "1","2" and "3" case '1': $price = 'my secret selected value 1'; // whatever secret value you want if they select 1 break; case '2': $price = 'my secret selected value 2'; // whatever secret value you want if they select 2 break; case '3': $price = 'my secret selected value 3'; // whatever secret value you want if they select 3 break; //add additional case values as needed for each dropdown/radio option } return $price; // return the secret admin only field text value } return $value; //return the normal value for all other forms and fields not matched }

Hope this helps :)

hello, I have moved a form with encrypted fields to a newer version of the website. I send a PDF with the encrypted fields and the viewer is able to see these. But this is no longer working. I see in the original site, we are using a PDF template called “GFEF DECRYPT ALL+”. I don’t recall how I found this or installed it into the Gravity PDF templates. Can you direct me to this?

thank you! Bret Johnson

Hello

In settings page click “VIDEO TUTORIALS AND RESOURCES” button. There is documentation and template for gravity pdf there

Hope this helps :)

Since my update 5.7.71 – 6.1.4 some of my content disapear, if i activate the ENCRYPTION TESTING AND VERIFICATION function i see theres content into the entries but if i desactivate the test i see blank entries it doesn’t affect all my forms and all my entries but somes entries has disapear… i recover a database from the day before the backup and the data is still blank

thanks for answer

Hello

This is very likely due to you using a custom website key instead of the auto key against the warnings in the setup instructions.

When using a custom key , as the instructions note, you must check the key after every update to make sure it repopulates properly. If it does not, you need to copy it back in and save it before opening up the forms again.

If you accepted entries AFTER updating without correcting the key they will be encrypted under the auto key. You can change the key’s the new ..or old data is encrypted under by carefully following all instructions in the manual encrypt/decrypt tool to move all data to the same key.

To see your Old data just restore your proper website key and password. You should have these separately stored safely per instructions.

Updates never delete data and simple viewing of the data on the entries pages does not change anything in the database, unless you edit an entry and save the data as you saw it when editing.

If the above is correct diagnosis, I would highly recommend that you change over to using the auto key immediately to avoid this same issue in the future unless you absolutely have to use a custom key. You can decrypt the old data when your proper key/pass are in, and then re-encrypt it under the auto key so all data would be under auto key.

Hope this helps

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey