[Resuelto] Display a wiew output in a single line field
This support ticket is created hace 3 años, 9 meses. 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.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
I have created a view output that displays a score for a table view based on some conditions. This is done through a custom Javascript code. The correct output for this example is 96. I have tested that the output is 96 on this test page. All is good so far. enlace oculto
The next step is to use the view shortcode in a single line field to display a dynamic output in another View. When I do, the output value is changed to 93.
Do you have any idea why the output value is changing?
Here is a screen recording so you can see what I'm trying to do. enlace oculto
Hello. Thank you for contacting the Toolset support.
Can you please send me problem URL of the listing page where you are trying to display the scorer as well as admin access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Yes, it works for the Akersgata 20 record. But I'm going to update the score field for every records in the Building post type the same way.
I have created a similar view for the building Bygdøy Allé 1 enlace oculto
The output score is calculated to 91 which is correct
When I update the building score for Bygdøy Allé 1 with the shortcode [wpv-view name="building-score-total-bygdoy-alle-1"] enlace oculto
Both Akersgata 20 and Bygdøy Allé 1 displays the value 91 on the listing page enlace oculto (Se screenshot)
The thing is that you have complicated setup and I'm not sure why you are adding the hidden table when you do not want to display the table.
Another thing is that this is nothing to do with Toolset (views) as you have your custom calculations and you will require to adjust the said JS code you added to it.
However - I've adjusted the JS function as given under:
When I use this code on other Views without changing anything. The score is 0 for all but the first. I think we're pretty close to getting this to work now 🙂
enlace oculto
My 3 Views: enlace oculto enlace oculto enlace oculto
It should work now and thank you for understanding that this issue has nothing to do with Toolset but pure custom Javascript code. That is beyond the scope of our support policy.