WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms Directory
[resolved] Missing argument 3 (8 posts)

  1. brianlockwood
    Member
    Posted 2 years ago #

    I had a directory listing which was working in the old version of "Gravity Forms" and old version "Gravity Forms Directory & Addons" but after running an update we get these errors for anything which has more then 200 characters.

    "Warning: Missing argument 3 for RGFormsModel::get_field_value_long(), called in /home/howwhat/public_html/wp-content/plugins/gravity-forms-addons/gravity-forms-addons.php on line 3774 and defined in /home/howwhat/public_html/wp-content/plugins/gravityforms/forms_model.php on line 2207"

    http://wordpress.org/extend/plugins/gravity-forms-addons/

  2. dawnmariez
    Member
    Posted 2 years ago #

    ditto for over 2 weeks now...anyone have a quick fix other than reverting to pre-updated versions?

  3. jjdualan
    Member
    Posted 2 years ago #

    Any word on this problem? I'm experiencing the same thing.

  4. jjdualan
    Member
    Posted 2 years ago #

    I had a problem with the textarea entry getting truncated and I think it was related to this issue. The problem is that on the new versions of Gravity forms the get_field_value_long() function is expecting to get passed 3 arguments and the first one is supposed to be an array. The directory addon is passing an integer ID.

    I created a duplicate of the function and changed it to use a regular integer instead of an array, then called the new function from the directory addon and the truncating was fixed.

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  5. Andreas Ostheimer
    Member
    Posted 2 years ago #

    jjdualan, can you pastebin the code?

  6. Andreas Ostheimer
    Member
    Posted 2 years ago #

    Was the code something like the following?

    I have update get_gf_field_value_long in gravity-forms-addons.php to

    // To retrieve textarea inputs from a lead
    		// Example: get_gf_field_value_long(22, '14');
    		function get_gf_field_value_long($leadid, $fieldid) {
    			$leadid_arr = array(id=>$leadid);
    			return RGFormsModel::get_field_value_long($leadid_arr, $fieldid, 1);
    		}

    in order to provide the array for the first argument and a third one.
    Works.

  7. colormehappy
    Member
    Posted 2 years ago #

    This worked great, no more warning message however the table is not displaying the entire entry. I set the max characters and selected 'large' field size but the entry is truncated in the table view display on the webpage. Any suggestions would be greatly appreciated. Thanks.

  8. Zack Katz
    Member
    Plugin Author

    Posted 1 year ago #

    This issue is fixed in a coming release.

    @colormehappy: try adding fulltext="true" to your shortcode.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic