Form inside tab problem

Discuss phpwcms here, please do not post support requests, bug reports, or feature requests! Non-phpwcms questions, discussion goes in General Chat!
Post Reply
achilehero
Posts: 69
Joined: Sun 4. Jan 2009, 13:30

Form inside tab problem

Post by achilehero »

Hi all!

I have here http://www.hiarom.ro/index.php?hiab-008-t (this is the only link where I tried the feature I am trying to implement) a problem with a form inside a tab.

I use a Tabs CP and a Form CP. The Form CP is called as an alias ({SHOW_CONTENT, CP(A), id}) inside the 4th tab (Informatii aditionale). The problem is as follows: when I submit the form, it calls for http://www.hiarom.ro/index.php?hiab-008-t#jumpForm314 to display errors or succes, but this takes me back to the first tab on the page. If I click the 4th tab I can see whether it was success or there are errors on the form, but this is not at all user friendly. Does anyone know a solution or a workaround for this?
I have tried different solutions, but none of them works. I can access the 4th tab by a link anchor like this: http://www.hiarom.ro/index.php?hiab-008-t#tabs=tab_4. But if I redirect the form to this link, it displays (obviously) an empty form, as it is a call to a new page. Is there a way to jump to the tab, automatically after getting http://www.hiarom.ro/index.php?hiab-008-t#jumpForm314 which validates the form results?

For the tabs I have used both Ojay Tabs (http://ojay.othermedia.org/articles/tabs.html) and Simple Tabs with history (http://digitarald.de/project/simple-tabs/) but neither works. Any help or idea is welcome. Thanks!
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Form inside tab problem

Post by update »

You need to set a cookie for instance to remember the last state so the form tab will stay opened when the page reloads.
Try the following and adapt it to your needs. Here is the link: http://www.mooforum.net/solutions12/acc ... t2438.html)
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Form inside tab problem

Post by update »

Did you succeed?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
achilehero
Posts: 69
Joined: Sun 4. Jan 2009, 13:30

Re: Form inside tab problem

Post by achilehero »

Yes. Thanks a lot. It is strange, because I tried the cookie method before you sugested it but it didn't work somehow, or it was a mistake somewhere, from my part. Anyway, I tried it again, and it seems to work the way I need it. Thanks again!
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Form inside tab problem

Post by update »

yes, I can see it's working now. Fine!
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
achilehero
Posts: 69
Joined: Sun 4. Jan 2009, 13:30

Re: Form inside tab problem

Post by achilehero »

Yep. Thanks. It's based on the page link (as it calls the form with a hash), so when the link has the hash part and the url is the submitted one, it selects the 4th tab.
Post Reply