Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Display and submit form to same tab

  • gravesie
  • gravesie
  • OFFLINE
  • Posts: 19
  • Thanks: 2
  • Karma: 0
11 years 8 months ago - 11 years 8 months ago #221451 by gravesie
Re: about tabs... was created by gravesie
I have a form in a CB tab that I need to display in the same tab when it submits in case of errors or confirmation that the form has submitted correctly. I have tried using the jquery on this blog and all I get in the URL is the form name appended to the URL. I can get the code to write to the HTML but it is does nothing, do I need to wrap it in script tags? I have wrapped it in script tags and no difference.

I have also downloaded and enabled auto actions - creating a new action but the plugin is not saving my action. How do I get a form on a tab to display in the same tab when submit please?

Thank you
Last edit: 11 years 8 months ago by gravesie. Reason: tried another way to solve it

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #221487 by krileon
Replied by krileon on topic Re: about tabs...
Have moved your topic to a new topic. Please don't resurrect 10 month only topics. Simply create a new one and point a link to it if needed.

For what you're wanting to work you're going to need to use AJAX to submit the form so its submit and response does not cause a page load. In the same jQuery that you prepare it you'd tell it how to handle the response. The below is included with CB.

malsup.com/jquery/form/

So you'd set your Code action method to use jQuery, you'd set the jQuery plugin to "form", and supply jQuery to use this plugin (see link above for documentation and examples). Your HTML can probably just be a delimiter field.

Note you can not have forms within forms so this will not work in profile edit.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum