Skip Navigation

[Résolu] Use of a Views as a select inside a Forms don't work id additional parameters de

This support ticket is created Il y a 3 années et 7 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Marqué : 

This topic contains 17 réponses, has 2 voix.

Last updated by Shane Il y a 3 années et 7 mois.

Assisted by: Shane.

Auteur
Publications
#1768403

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

I cannot give an answer whether this is something that would be possible in the near future, however what I can do is make the request. It is up to the development team to approve it.

However the issue is on the side of Toolset Forms and the nested shortcodes breaking the expected input.

Thanks,
Shane

#1773531

Pat

Ok Shane, I understand.

I have another question : how do I structure my hook to use several queries inside (ie: the idea here is to use the hook for all needed filtering parameters).
The Views is related to products and I have several custom fields to manage :
_stock, wpcf-annule, wpcf-type-evenement and wpcf-annee-univers
All these custom fields belong to product and could be retrieved from the database.
Regards
Pat

#1773621

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

Given that you will be checking against the post type meta then you will need to do a meta query.

So the meta query would look like this.


$args = array(
    'post_type'  => 'product',
    'meta_query' => array(
        'relation' => 'OR',
        array(
            'key'     => 'color',
            'value'   => 'blue',
            'compare' => 'NOT LIKE',
        ),
        array(
            'key'     => 'price',
            'value'   => array( 20, 100 ),
            'type'    => 'numeric',
            'compare' => 'BETWEEN',
        ),
    ),
);

This is just an example from the wordpress documentation.

Please let me know if this helps.
Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.