Hey Minesh,
Yep I can see it works great.
So to confirm, for this to work it needs 'both' Views, my original 36515 and your new 37117?
If this the case, 'both' need the conditions updated if I add more pages?
Many thanks.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
On your original view:
=> hidden link
Within the "Search and Pagination" section, if you add more pages, you will require to add more conditions.
So, if you add new page for collection value "xyz". Then, to that new page, you will require to add the view form as:
[wpv-form-view name="feat-loc-destin-pages" wpv-collection="xyz" target_id="36480"]
And within the view's "Search And pagination" section, you will require to add conditional statement as:
=> hidden link
[wpv-conditional if="( '[wpv-attribute name='wpv-collection']' eq 'xyz' )"]
<input type="hidden" name="wpv-collection" value="xyz" />
[/wpv-conditional]
I hope this is clear now. please let me know your feedback.
Ok I understand.
Glamping works great however one of our most popular collections is: hidden link
Now if you use this, without selecting Pets > Yes the results are not right.
I as a visitor wouldn't select anything here presuming I'm on the page so it must all be Pets Ues anyway.
In this instance, is there a way of the pre selected actually being set by default?
Many thanks.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
To set the selected value for your Pets dropdown:
=> hidden link
I've added the following JS code to your following View's "Search and Pagination" section JS editor:
=> hidden link
jQuery( document ).ready(function($){
x = $("input[name='wpv-collection']").val();
if(x=="dog-friendly"){
$("select[name='wpv-pet'] [value='yes']").prop("selected","selected");
}
});
I can see now when you load the page: hidden link
- It does set the Pets yes.
Please open a new ticket for every new question you may have. I hope we can close here 🙂
Hi there,
I understand, however I'm still worried this is taking a lot of extra code to make to work. That said I have just added sea-views to both your conditional codes, and this isn't working.
hidden link
Select Area > Suffolk and nothing else. Just about all are inland and don't have a sea view.
Ready to leave this Minesh and get rid as I do understand I'm possibly pushing Toolset beyond what it can do.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Can you please check now: hidden link
Its working.
With the following view:
=> hidden link
- if you make any changes and see the following dialog as per the following screenshot - Click on "No" button:
=> hidden link
I can see its working and this should work for your other pages as well now.
Thank you Minesh for all your help and pointing out what I need to do.
Appreciate your time.
Take care, Pete
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Glad to help. Please feel free to mark resolve this ticket and share your feedback 🙂
This isn't allowing me to resolve the ticket Minesh.
All done so happy for you to do so please 🙂
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
You have to add different message (other than "My issue is resolved now. Thank you!").
The different message will allow you to mark resolve this ticket.