Hi neoseeyou,
Normally a shortcode is calling a function in the background, so to ‘ajaxize’ this shortcode, you would need to find the name of the function that the shortcode calls.
If you give me the name of the plugin and the shortcode that you use, I can try and have a look for you and see if it’s possible to ajaxize it.
Cheers
Yoav
Thread Starter
alpha2
(@neoseeyou)
Hello Joav, thanks for the quick reply and sorry for double post, yep i use the plugin wp-client and the shortcode is [wpc_client_registration_form]
Ah, this plugin is not free, so I can’t check the source code and can’t find any documentation.
However, you can probably add a small function to your functions.php file:
function ajaxize_wpc_client_registration_form() {
echo do_shortcode('[wpc_client_registration_form]');
}
and then use ajaxize_wpc_client_registration_form as the function name for ajaxize. This should hopefully work (untested)
Thread Starter
alpha2
(@neoseeyou)
Ok so this function call the form but unfortunatly, it’s not working propely.
Can we talk quickly by email? is it possible? and give the solution for all after on this forum
Can you explain what’s not working exactly?
Thread Starter
alpha2
(@neoseeyou)
i give you a link it will be easier 😉
http://www.totalwebdesign.fr/testclient456/test/
well the form is loading but don’t work as expected. When you fill partial informations it reload the page and give any error message for example
By the way thank you for your time Yoav
I had a quick look, but it’s hard to say exactly why it fails. I don’t know the plugin or how it handles form submissions, or how it works *without* ajaxize. To be honest, If I were you I would just put the form on the page as usual, and exclude the page with the form from your caching if you use any (I assume the reason to use ajaxize for the form is when the page might be cached? and otherwise, I don’t see a need to ajaxize this…).
I see that you’re using W3TC. It’s easy to exclude one page / url from the cache with this plugin. It’s much easier (and probably better) than trying to ajaxize just the form.
Thread Starter
alpha2
(@neoseeyou)
Yes i understand without any access hard to know how solve this 😉
In fact i want to put this form on a modal box like you can notice on top of the page http://www.totalwebdesign.fr/testclient456/test/
The link(inscription gratuite) open a modal box with this form that’s why i wanted a ajax function, to manage all in the modal
I’m not sure exactly, but as I said, if I were you, I’d leave any forms out of the cache anyway, and not risk having weird behaviour. Forms / shopping carts etc are meant to show or get unique user input so I would simply exclude them from any caching.
As for using ajax. You can if you really know what you’re doing. But if it’s a 3rd party plugin, I would be careful trying to play around too much with it.
Sorry I’m not of much help, but this seems like a pretty specific problem to this plugin / website.
Thread Starter
alpha2
(@neoseeyou)
Thank you Yoav, i will follow your advices and leave out of the cache foms , shopping carts…
I understand that’s problem is very specific and cannot be solve easely
Anyway thanks for your time, i really appreciate it
no problem, sorry I didn’t actually solve your problem, but hope you can manage. Let me know if there’s anything else specific to ajaxize.