Tell us what you are trying to do? created a CRED form and have added a long taxonomy section , which slows down the loading of the form.
Is there any documentation that you are following? could not find
Is there a similar example that we can see? hidden link then scroll down a bit, you will see Toolset ( see pic for a bit of it )
What is the link to your site? hidden link
Hello and thank you for contacting the Toolset support.
I notice that the form page is 5-6 seconds slower than other pages of the website. Maybe this is expected, due to the size of the data that the form generates.
To investigate this issue I suggest working on a copy of your website in a test server. And note the loading time for each test, I usually use "Page Load Time" browser extension:
- Test the page with a default theme and only Toolset plugins.
- Duplicate the form and test a new page where the form does not contain the taxonomy field.
You can also check with the Query Monitor plugin to verify which part of the page/form/view is consuming more time.
I hope this helps. Looking forward to your reply.
prior to adding to the form no noticeable speed issues were apparent.
so the issue is the loading of that particular field. as an upside i have put more effort into speed,
and optimizing mostly irrelevant to my issue, since the page speed was ok pretty much,
and after all that effort once can see a difference, but overall speed might be able to be improved
by figuring out where in the toolset some ideas might apply. i do have the test site, while i was fixing othr things,
but for production site i just do it there and test using gtmetrics or goodle speed tests. image compression is a big deal on these tests, so i used smush to try to optimize them. but as for trying to minify jquery i installed hummingbird and most of those js files were not to be touched. so one feature i would ask of toolset , is there a way to preload into the form some how this piece that i added to the form. wondering if that is doable? some sort of preload or prefetch or advance into the loading, an asyncronous piece...
Thank you for your feedback. Before being able to escalate any issue to our developers, I'll need to analyze it a bit and gather as many details about it as possible. Can you allow me temporary access to your test site to check this form and its fields closely? Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
After that, I will try to reproduce the issue on a clean install to exclude any possible conflicts with other components(theme, plugins). I will also try different scenarios. Then I might be able to approach our 2nd Tier for a 2nd opinion.
For suggesting features, you can use this form, the messages are submitted to our product managers who will evaluate the feature and decide if it should be scheduled for coming releases.
http://toolset.com/contact-us/suggest-a-new-feature-for-toolset/
Thank you for the feedback and the access credentials. My apologies for the late reply, I was on my weekend.
I cloned the form and the page and removed the taxonomy field, it loads in 2-3s. It is definitely the generation of the taxonomy field that is causing this issue.
I do not see a way to load/preload only the taxonomy field, there might be some way to work around it using conditionals and AJAX.
A form is always generated as one thing, conditionals inside it, only hide/show, but the markup is already generated and consumed the required time.
But we can load a whole form with AJAX, check this ticket, for example, it explains a way to load the form(inside another page) with AJAX.
https://toolset.com/forums/topic/can-a-cred-form-be-ajax-loaded/#post-446197
I hope this answers your question about preloading. Let me know your thoughts.
Hello, I got another opinion from a colleague on the team. He suggested to use a generic field for the taxonomy field, and use a view to display the states and counties. As views, can be cached, the time to render the field will be minimal for other visits to the form, only the first visit will generate such a 8-9s.
Then, you can use a custom code hooked to the cred_save_data action to save the values for the taxonomies. Below some documentation articles about generic fields and the Toolset Forms hooks.
- https://toolset.com/documentation/user-guides/front-end-forms/inserting-generic-fields-into-forms/
- https://toolset.com/documentation/programmer-reference/cred-api/
I hope this helps. I remain at your disposal.
well i just finished the coding jQuery to figure out how to stop the form from being submitted when that taxonomy field is not filled out. its not perfect but good enough. Then i created the css for helping the ugliness of the field be more usable. Then i also just fixed the function file so that now the auto draft is gone, the permalink is fixed and the thing ends up ready for publishing.
so i don't want to change what was working on the form etc.
however when i check the speed using an online tool ( see pic) there are things that i may be able to do,
if you can suggest ways to go about it. everything is all green except the top stuff. can you suggest ways to fix these?
My issue is resolved now. Thank you!