• Resolved chrisok_oz

    (@chrisok_oz)


    Hi there,

    I’ve just updated from version 1.0 directly to the latest recently, and the plugin has stopped working for me. It’s 100% to do with the way that I am using it/other plugins I am using, and not due to a coding error on your part – I use another GF plugin which also makes modifications to list fields, and unfortunately changes the type (but not the inputType) property as part of this.

    It’s totally not your responsibility to be compatible with every (/any) gf plugin out there, I get that, but basically the only place this currently presents a problem is in gravity-forms-list-field-date-plugin.php:338 in the list_has_datepicker_field() function:

    if ( 'list' == $field['type'] ) {

    By removing the direct access to the type property and replacing with the built in GForms function get_input_type() this is immediately resolved, like so:

    if ( 'list' == $field->get_input_type() ) {

    It would also make the PHP code more consistent with the client side code, as the inline javascript used by the list date field plugin currently determines type using the equivalent GetInputType().

    I was wondering if you would consider making this change as part of the core plugin? If you’d prefer not to that’s totally your own prerogative, and I’ll just branch it on Github, but it would be nice if I could stay on the core branch and benefit from your hard work doing updates and maintenance.

    Thanks very much in any case for your work on this plugin ??

    https://www.ads-software.com/plugins/gravity-forms-list-field-date-picker/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ovann86

    (@ovann86)

    Sure thing, I’ll make that update in the next release – which I can do in the next day or so.

    Of course feel free to modify your copy on your website for the time being.

    I havent put as much attention to this plugin as I would like to … I might do a quick run through and see if there’s anything else that needs to be done as the same time.

    Let me know if you have anything else in mind or other suggestions.

    Thread Starter chrisok_oz

    (@chrisok_oz)

    One other thing I noticed, that shouldn’t be causing any issues but is just a matter of best practices, is the use of wp_print_styles to output the datepicker css on line 86. The Codex reports this as a deprecated function now, but I’m not immediately sure of whether just wp_enqueue_styles can be left as a drop in replacement or more is required.

    Thanks very much for the super quick response too!

    Plugin Author ovann86

    (@ovann86)

    Good spot ! That was a copy and paste from GF and it looks like they’ve changed it there now.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get fields calculated type rather than direct access’ is closed to new replies.