Skip Navigation

[Resolved] Problem with a custom search Toolset View

This thread is resolved. Here is a description of the problem and solution.

Problem:
JS added for custom search form is not triggered when you add custom search form inside the Elementor Toggle.

Solution:
You need to adjust the JS code per elementor toggle.

You can find the proposed solution, in this case with the following reply:
https://toolset.com/forums/topic/problem-with-a-custom-search-toolset-view/#post-1620865

Relevant Documentation:

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

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 11 replies, has 2 voices.

Last updated by silvian 4 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#1619397

Hi,
I'm opening a new ticket on a previuos issue, that Minesh helped me solving. But I realized now that there's yet a problem.

I have a custom search Toolset View here: hidden link ( the sidebar blue box) that is working well: if you select "Affitto" ( = For Rent ) you see that "Canone Min" and "Canone Max" appear while "Prezzo Min" and "Prezzo Max " are hidden (these are different fields for different price ranges, that needs to be shown either for properties on Rent or Sale)

However the same stuff is not working on another Custom Search Toolset View: hidden link (please click on the blu/yellow button to see it) . Here, if I select" Affitto" ( =For Rent), nothing changes: I still see the "Prezzo Min" and "Prezzo Max" fields that refer to "Vendita"(= For Sale) .

On both views there's a little jQuery code that Minesh wrote for me because I can't write JS to make it working, and the code and everything seem the same to me on the 2 views, However one is working while the other is not

jQuery(document).ready(function($){
$('input[value="vendita"]').attr('checked', true).trigger('change');

$('input[type=radio][name="wpv-wpcf-tipo-annuncio"]').change(function() {
if (this.value == 'vendita') {
$("#filter_rp").hide();
$("#filter_sp").show();
}
else if (this.value == 'affitto') {
$("#filter_sp").hide();
$("#filter_rp").show();
}
});

});

Could you please have a look and help me find what's wrong, or missing.. or...?

Thank you!
S.

#1619739

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please send me access details so I can check further whats going wrong with your setup.

I have set the next reply to private which means only you and I have access to it.

#1619919

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As you can see with the following test page (which is added as draft): hidden link

The scrip works as expected. The thing is that you are using the elementor's toggle and the div is hidden. So, as the div is hidden it could not able to find the elements for which we wrote the custom JS code. In this case I would suggest you to contact elementor for further support or contact pro JS developer for further help.

#1620325

Hi Minesh, I see, I understand what the issue is.
I tried writing to the Elementor support but they are not answering.
I 've opened a project on codeable and i got an estimate of $ 250 USD to solve this. I believe it's too much. Am I wrong?
Do you think it's an onest price?
I don't think so.
I'm searching on google and trying to solve by myself. if you can help me I would be thankful.
If I have to pay, I would pay up to $ 50 , but please tell me if i'm wrong.
I know how much time consuming writing code can be, but I believe this is not a difficult issue for anyone proficent in JS.
Anyway I maybe wrong, and the fact is that I can't solve it on my own 🙁

#1620747

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please tell me where you added the following JS code?

  if($('#elementor-tab-content-1791').css('display') == 'block') {
alert("Hello! I am an alert box!!");

 }
#1620805

Hi Minesh, it's here:
hidden link
I was trying to do something, like to call the jQuery when the element is made visible, or to put the js inside the toogle / popup ...
with that plugin HFCM , I believe you can also take a shortcode of the snippet and then place where you want(not sure actually) .. but I haven't finished my test also becasuse there's some error on that code I was trying to write. ...

#1620865

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Let me clarify something that what you wrote with the previous reply:
=> https://toolset.com/forums/topic/problem-with-a-custom-search-toolset-view/#post-1620325

If you did not manage to do it on your own, you need to hire Devs and its not Toolset constraint that for what price the custom costs. It could cost any amount and Toolset is not responsible for such custom code. I hope this is clear 🙂

The help you asked is already above and beyond the scope of our support policy.

The good news is that I've added the following JS code to your view's JS box:

 $("#elementor-tab-title-1791").on("click", function(){
    if($(this).hasClass("elementor-active")){
    	$('input[value="vendita"]').attr('checked', true).trigger("click");
      
      	$('input[name="wpv-wpcf-tipo-annuncio"]').change(function() {
                      if (this.value == 'vendita') {
                              $("#filter_rp").hide();
                              $("#filter_sp").show();
                      }else if (this.value == 'affitto') {
                                 $("#filter_sp").hide();
                                $("#filter_rp").show();
      
                       }
  
                 });
    
    
    }
   
});

Can you please confirm it works as expected: hidden link

#1620973

Hi Minesh, you're perfectly right and I don't want to take advantage of Toolset support and your support, which I understand is beyond its scope.
it's not a Toolset problem or bug... it's just me that I'm lacking JS knowledge and experience, I'm perfectly aware of this.
I was upset yesterday because I spent the whole day trying to solve this that seems a little issue and I was upset when the developer asked me so much money.
Minesh, I can swear you: when at first I tried this morning from the phone after reading your email, It seemed to me it wasn't working yet. Then I had an appointment, I came back, i tried again, and it worked.
After that I was talking with my partner and making him see what I was talking about (because i have the same issue on the pop up as well) and why I am so nervous... and it's not working again, on the Elementor toggle. I havent' changed anything on your code.

#1621007

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Please make sure you should clear your browser's cache and make sure the full page is loaded before you start clicking on the page.

Please check the following video: hidden link

#1621159

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Do you see it working?

#1622477

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I hope the solution I shared is working as I shared the video and that help you to resolve your issue.

#1622595

My issue is resolved now. Thank you!