Results 1 to 6 of 6

Thread: How to get all the input fields in tab content control

  1. #1
    Join Date
    Mar 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to get all the input fields in tab content control

    Hello, I am using the tab content control (http://www.dynamicdrive.com/dynamici...ntent/demo.htm) and I have text inputs in every tab, but when I click to submit the form, I am only receiving the active inputs. So my question is, what can I do to get all the input from all the tabs when I submit the form?

    this is my code for the html page that contains the tab control

    HTML Code:
    <form id="fm-form"  method="post" action="send_inputs">
    <p>
    - First tab shows default, inline content directly added inside container DIV<br />
    - 2nd and 3rd tabs show external pages fetched via <b>Ajax</b><br />
    - 4th tab shows an external page fetched via <b>IFRAME</b><br />
    </p>
    
    <ul id="countrytabs" class="shadetabs">
    <li><a href="/CodeIgniter_2.0.0/APPS_app/html/correspondencia_view.htm" rel="countrycontainer" class="selected">Tab 1</a></li>
    <li><a href="tab1.htm" rel="countrycontainer">Tab 2</a></li>
    <li><a href="tab2.htm" rel="countrycontainer">Tab 3</a></li>
    <li><a href="tab3.htm" rel="#iframe">Tab 4</a></li>
    <li><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>
    </ul>
    
    <div id="countrydivcontainer" style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px">
    <p>This is some default tab content, embedded directly inside this space and not via Ajax. It can be shown when no tabs are automatically selected, or associated with a certain tab, in this case, the first tab.</p>
    </div>
     <input name="Submit" value="registrar" type="submit" /> 
    <script type="text/javascript">
    
    var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
    countries.setpersist(true)
    countries.setselectedClassTarget("link") //"link" or "linkparent"
    countries.init()
    
    </script>
    
    <p><a href="javascript: countries.expandit(3)">Dynamically select last Tab</a> | <a href="demo.htm?countrytabs=1">Reload page and select 2nd tab using URL parameter</a></p>
    
    <hr />
    
    </form>
    Thanks in advance

  2. #2
    Join Date
    Jul 2010
    Location
    Minnesota
    Posts
    256
    Thanks
    1
    Thanked 21 Times in 21 Posts

    Default

    My guess is that because you have the tabs pulling from other files and not from code in the page you are on it's not able to read it for a form, but that's just a guess without actually trying it.

  3. #3
    Join Date
    Mar 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes, I have the tabs pulling from other files the content of the tab... I'm gonna try to have all my tabs content in the main page.

  4. #4
    Join Date
    Mar 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am clueless I can't put all the content in the main page. I think that the functionality that I am looking for is very common, but since I can't find any resource, I am not sure if I am using in the right way this control or maybe the logic in PHP... I have like 3 days coding in this language.

    Any help will be appreciated

  5. #5
    Join Date
    Jul 2010
    Location
    Minnesota
    Posts
    256
    Thanks
    1
    Thanked 21 Times in 21 Posts

    Default

    Ok, I don't think this will be possible with just php, you will possibly need to create hidden input fields on the other tab pages that hold all the other input fields that are not on that particular page cause the browser is only recognizing the active inputs cause the others are hidden to the browser. PHP can't transfer the data from one tab to the other without a page refresh at the very least cause php only works on the server side not client side, so javascript would be the only way I can think of to do this. You should probably ask in the Javascript forum instead.

  6. #6
    Join Date
    Mar 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks fastsol1, I will try with javascript... Regards.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •