PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

wp_rg_lead_detail too small

  1. We are encrypting information and letting GF store it. However the 200 varchar limit breaks GPG output since its always going to be larger then that. Two questions:

    1) Why the tight limit? Was it a setup option I missed?

    2) Our fix was modifying the table: alter table wp_rg_lead_detail modify value varchar(2048);
    Any concerns with this?

    Thx for the API, made my life way better today!

    John-

    Posted 13 years ago on Sunday October 23, 2011 | Permalink
  2. The reason for the 200 character limit was for speed in loading the entries in the admin. If it works for you, it works.

    There is also a wp_rg_lead_detail_long for the full entry.

    Posted 13 years ago on Monday October 24, 2011 | Permalink
  3. Is there a way to access 'wp_rg_lead_detail_long' within the notification?

    When I check wp_rg_lead_detail_long it is empty. How do entries get into this table?

    Posted 13 years ago on Monday October 24, 2011 | Permalink
  4. Entries get into the wp_rg_lead_detail_long table when they exceed 200 characters. Gravity Forms stores the first 200 characters in the wp_rg_lead_detail table and if the submitted value is larger than 200 characters, the full value is stored in the wp_rg_lead_detail_long table. So the wp_rg_lead_detail_long table will only have entries when needed.
    All of that should be transparent to you though. When you access the $entry object within one of our hooks, it should give you the full value of the field (it will get it from the wp_rg_lead_detail_long table if needed).
    How exactly are you storing these encrypted fields? Are you inserting them manually or are they fields in the form? How are you reading the encrypted value? Which hook(s) are you using?

    Posted 13 years ago on Monday October 24, 2011 | Permalink
  5. I am using the hook as below. When I use this the detail is NOT updated. We get no detail entries.

    Here is our hook function.

    ----

    [php]
    function save_field_value($value, $lead, $field){
    	if($field['adminLabel'] == $SPECIALFIELDNAME){
    		require_once 'Crypt/GPG.php';
    		$gpg = new Crypt_GPG(array('homedir' => $KEYDIR, 'debug' => false));
    		$gpg->addEncryptKey($KEYNAME);
    		$encrypted = $gpg->encrypt($value);
    		return $encrypted;
    
    	} else {
    		return $value;
    	}
    }

    ----

    Posted 13 years ago on Thursday November 3, 2011 | Permalink
  6. Ok. Now I understand what is going on. There was actually a problem with the position of the gform_save_field_value filter that prevented it from accepting values greater than 200 characters. I have made an adjustment and it looks like it will work OK for you. Please email me to alex@rocketgenius.com and I will send it your way.

    Posted 13 years ago on Thursday November 3, 2011 | Permalink
  7. Sent, tx Alex!

    Posted 13 years ago on Thursday November 3, 2011 | Permalink
  8. Hi Alex, I'm also having issues with this. Could you send this update to me as well?

    Posted 13 years ago on Wednesday November 9, 2011 | Permalink
  9. Bjørn, please send an email to alex@rocketgenius.com and reference this topic and your reply. Thank you.

    Posted 13 years ago on Wednesday November 9, 2011 | Permalink