• Resolved wilhemarnoldy

    (@wilhemarnoldy)


    Hi team,

    I have some issue with the ‘type’ selector inside $filter_array.
    I tried all the different types ( text, checkbox, radio… ) but it doesn’t to work because i’m always getting the regular text type with an operator select and an input.

    What i tried for example =

    'date_field2' => array(
            'name' => 'date',
            'meta' => '_birthday',
            'type' => 'date' // Gives a datepicker. Also automatically sets 'cast' to 'DATE'
        ),
        'normal_field2' => array(
            'name' => 'textarea',
            'meta' => '_text',
            'type' => 'textarea', // this would be text by default without declaring it
            'desc' => 'Optional supporting text to help user enter data.'
        ),
        'normal_field3' => array(
            'name' => 'checkbox',
            'meta' => '_text',
            'type' => 'checkbox', // this would be text by default without declaring it
            'desc' => 'Optional supporting text to help user enter data.'
        ),
        'normal_field4' => array(
            'name' => 'radio',
            'meta' => '_text',
            'type' => 'radio', // this would be text by default without declaring it
            'desc' => 'Optional supporting text to help user enter data.'
        ),

    What i get for Radio =

    <tr><th scope="row">radio</th><td><select id="tribe_filters_is_normal_field4" name="tribe_filters_is_normal_field4" class="no-multi"><option value="like">Recherche</option><option value="is">Est</option><option value="not">N'est pas</option><option value="gt">></option><option value="lt" selected="selected"><</option><option value="gte">>=</option><option value="lte"><=</option></select><input type="text" name="tribe_filters_val_normal_field4" value="0efzfzefez" class="text"><b class="close">×</b></td></tr>

    Can you help me ?

    Thanks a lot !
    Wilhem

    https://wordpress.org/plugins/advanced-post-manager/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter wilhemarnoldy

    (@wilhemarnoldy)

    Hi team,

    I succeed with dates ( with ‘cast’ => ‘DATE’ ), but i am still not able to print a checkbox or a radio or a text area for example ?
    Please can you help me or show me the way ?

    Thanks,
    Wilhem

    Thread Starter wilhemarnoldy

    (@wilhemarnoldy)

    Also, description field isn’t working for me =

    'desc' => 'Optional supporting text to help user enter data.'

    Brook

    (@brook-tribe)

    Howdy wilhemarnoldy,

    That looks like a bug to me. I am seeing the same problems in my tests. I am ticketing this for our developers to look at and eventually release an update for.

    In the mean time you can still define custom types. All of our plugins that use APM are currently using custom types for each field. More details on these are in the documentation.

    Thank you for bringing this to our attention! I am sorry it has been such a pain so far. Please let me know if you have any questions.

    Cheers!
    – Brook

    Thread Starter wilhemarnoldy

    (@wilhemarnoldy)

    Hi Brook,

    Ok, I am reassured ! I thought i was doing wrong !
    You are welcome, please let me know if a can help for something ; and by the way can you keep me update of debugging ?

    Thanks a lot,
    Wilhem

    Sure thing! We’ll be sure to post an update here in the forums when the next release is pushed out. 🙂

    Thread Starter wilhemarnoldy

    (@wilhemarnoldy)

    Hi @geoffgraham,

    When do you think you’ll push this update ?
    Thank you for your reply !

    Other questions / improvements =

    ——— When do you plan the CSV export ?

    I saw your hidden button..

    ——— Can you add > < and < > ? BETWEEN and NOT BETWEEN ?

    I develop it on my own, it works as a beta, do you want to check and review my code ? I think it need some improvements.

    ——— Can i suggest you to add AND and OR relations for meta_queries ?

    I develop it on my own, it works as a beta, do you want to check and review my code ? I think it need some improvements (or change the design).

    Can we continue discussion by email maybe ?

    Thanks a lot !
    Best regards,
    Wilhem

    Thread Starter wilhemarnoldy

    (@wilhemarnoldy)

    Brook

    (@brook-tribe)

    Sorry for the delay! To be extremely frank APM is a little neglected. It was written by one of our senior developers for his own purposes years ago. He saw how it would benefit our biggest plugins, The Events Calendar, so it got included with that plugin for a while. When he moved on to different projects we sort of took over maintaining it. But it is not quite written how our dev team would like, and many have said it’s difficult to maintain. So it gets a bit neglected, especially now that it’s not included with the other plugins and must be installed separately.

    If you are interested in submitting some features for code review we would love that! https://github.com/moderntribe/advanced-post-manager That’s certainly the best way to see new features get added. If you submit a pull request it will get reviewed.

    When do you plan the CSV export ?

    There are no plans that I am aware of, nothing logged anywhere. That might be a relic from APM’s original developer.

    Can we continue discussion by email maybe ?

    I would love to find a way to communicate faster. This forum gets so few posts in it anymore that we only check it so often. Please feel free to email support (a) TheEventsCalendar (.) com . We actually are not oufitted to answer plugin support or dev questions via email, that email is only for help with accessing TheEventsCalendar.com accounts. However, if you are planning to submit a feature or two for code review I can hook you with up a free “developer license”. This will give you access to our forums over there, which we check every day. We can provide you with a higher level of support, the sort suited to plugin developers who love to write code. Just reference this thread in your email and I’ll take it from there.

    Please do let me know if you have any more questions. If you would like to continue the conversation here that works great too, whatever is best for you.

    Cheers!
    – Brook

    Thread Starter wilhemarnoldy

    (@wilhemarnoldy)

    Hey Brook,

    Thank you for replied me !
    And sorry for replying that late, I was quite busy too.

    Ok. I understand.
    Well, yes. I’m interested to suggest you some new features. I’m not a excellent developper ( because I’m a graphic designer ) but I think I added some great features that you can review and make the code better.

    So, I made a fork with a branch enhance-filters here : https://github.com/Wewill/advanced-post-manager

    If you please try it and get back to me ?
    We can continue the conversation here or by mail ? Or if you think that will be better for you, in your forums ! Just let me know what is your favorite / easiest way.

    Cheers and thank you !
    Wilhem

    Thanks Wilhem!

    Would you be willing to submit a pull request for the branch you created? That will push it through our code review process. 🙂

    Cheers!
    Geoff

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Issue with 'type'’ is closed to new replies.