Skip Navigation

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

This support ticket is created 4 years, 3 months ago. 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.

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)

Tagged: 

This topic contains 17 replies, has 2 voices.

Last updated by Shane 4 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#1768403

Shane
Supporter

Languages: English (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: English (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