• DEVHIDE
    • Home (current)
    • About
    • Contact
    • Cookie
    • Home (current)
    • About
    • Contact
    • Cookie
    • Disclaimer
    • Privacy
    • TOS
    Login Or Sign up

    How to create interactive form with bootstrap

    726 Views Asked by misanthrop At 12 July 2018 at 13:02 2025-11-26T21:54:20.578000

    My fiddle is here: http://jsfiddle.net/L4hkrwa6/14/

    The HTML code is here:

    <ul class="nav nav-pills nav-justified">
      <li class="nav-item nav-link active"><a data-toggle="tab" href="#Show1">Show1</a></li>
      <li class="nav-item nav-link"><a data-toggle="tab" href="#Show2">Show2</a></li>
      <li class="nav-item nav-link"><a data-toggle="tab" href="#Show3">Show3</a></li>
    </ul>
    
    <div class="tab-content">
      <form action="test">
        <div id="Show1" class="tab-pane fade in active">
          <input type="text" name="OnlyMe"/>
        </div>
      </form>
    
      <form action="differentTest">
        <div id="Show2" class="tab-pane fade">
          <input type="text" name="MeAnd23Submit"/>
        </div>
    
        <div id="Show3" class="tab-pane fade">
          <input type="text" name="MeAnd23Submit2"/>
        </div>
    
        <input type="text" name="23"/>
    
        <input type="submit" value="submit"/>
      </form>
    
    </div>
    

    When I click on Show1 (and when the page is loaded initially) I want to only see the Input 'OnlyMe'.

    When I click on Show2 I want to only see the Inputs 'MeAnd23Submit', '23' and the submit button.

    When I click on Show3 I want to only see the Inputs 'MeAnd23Submit2', '23' and the submit button.

    I tried several combinations but nothing seems to work, I would appreciate any help...

    Thanks in advance!

    Update: This is just a small example with the necessary items to understand the problem. In the "real case" I have many more input fields and I would like to not copy the fields in multiple tab-panes.

    html twitter-bootstrap tabcontainer nav-pills
    Original Q&A
    1

    There are 1 best solutions below

    4
    JuanDM JuanDM On 12 July 2018 at 13:16

    Have you tried this: forked fiddle

    <ul class="nav nav-pills nav-justified">
      <li class="nav-item nav-link active"><a data-toggle="tab" href="#Show1">Show1</a></li>
      <li class="nav-item nav-link"><a data-toggle="tab" href="#Show2">Show2</a></li>
      <li class="nav-item nav-link"><a data-toggle="tab" href="#Show3">Show3</a></li>
    </ul>
    
    <div class="tab-content">
      <div id="Show1" class="tab-pane fade in active">
        <form action="test">
          <input type="text" name="OnlyMe"/>
        </form>
      </div>
    
      <div id="Show2" class="tab-pane fade">
        <form action="differentTest">
          <input type="text" name="MeAnd23Submit"/>        
          <input type="text" name="23"/>
          <input type="submit" value="submit"/>
        </form>
      </div>
    
      <div id="Show3" class="tab-pane fade">
        <form action="differentTest">
          <input type="text" name="MeAnd23Submit2"/>    
          <input type="text" name="23"/>
          <input type="submit" value="submit"/>
        </form>
      </div>
    </div>
    

    Related Questions in HTML

    • How to store a date/time in sqlite (or something similar to a date)
    • How to use custom font during html to pdf conversion?
    • Storing the preferred font-size in localStorage
    • mp4 embedded videos within github pages website not loading
    • Scrimba tutorial was working, suddenly stopped even trying the default
    • Is there any way to glow this bulb image like a real light bulb
    • With non-graphical maps in Leaflet, zoomDelta doesn't work
    • What can I do to improve my coding on both html and css
    • Uncaught TypeError: google.maps.LatLng is not a constructor at init (script.js:7:13)
    • Bootstrap modal not showing at the desired position on a web page when the screen size is smaller
    • Displaying a Movie List on a Website Using Jinja2 and Bootstrap
    • How to redirect to thank you page after submitting a Google form embedded into a Google Site?
    • Storing selected language in localStorage
    • Fences (parenthesis, braces) in HTML and MathML
    • Understanding Scroll Anchoring Behavoir

    Related Questions in TWITTER-BOOTSTRAP

    • General questions about creating a custom theme Moodle CMS
    • How to fix - The modal dissapear below 992px.?
    • Bootstrap horizontal gutters issue
    • How can I add a list of icons to the right of a text area
    • Why isn't my Bootstrap background color class working as expected?
    • Edit button in each row of table using same Bootstrap modal as add button
    • Change Opacity of Bootstrap Button
    • bootstrap 5 multiple tab dropdown with tab pane
    • Bootstrap v5.3 navbar drop-downs not working. Why?
    • Should i learn Bootstrap in 2024
    • How to turn on Bootstrap Intellisense in .NET 8 Blazor
    • Bootstrap 5.3 burger menu not responsive in Underscore WordPress template
    • Bootstrap 5 columns not displaying inline
    • Bootstrap scaffolding not showing good on mobile
    • How to Prevent Select2 Dropdown from Moving with Scroll inside a Bootstrap Vue Modal?

    Related Questions in TABCONTAINER

    • In ASP.NET, TabContainer does not resize automatically
    • Scroll tabbar programmatically + Flutter
    • How to run different logic from Master page for different tab in TabContainer
    • Oracle APEX Tab Container row too long and not breaking
    • SAPUI5: sap.m.TextArea cursor position
    • jqGrid in tab is disappearing after tab change in ajax tab container
    • Renaming a tab in javascript tabContainer
    • link to a page with tabbed content doesnt work
    • Using TabContainer in an ObjectPageDynamicHeaderTitle in Fiori App
    • How to interact with non stored child controls in FMX design time? (TTabControl Tab Content)
    • ASP .NET AJAX TabContainer - Underline the text in the selected tab
    • Dojo TabContainer doesn't show control buttons correctly until after I do an Inspect Element
    • Navigating and adding to what's in a TabItem
    • dijit tabcontainer how do I hide a tab?
    • How to create interactive form with bootstrap

    Related Questions in NAV-PILLS

    • Using Bootstrap 5 vertical pills, how to display tab content directly under the nav link on mobile devices?
    • Django, unable to filter all items under one or more categories attached to it using dynamic bootstrap 5 nav pills using many to many relationship
    • Altering height of Python/Dash Navigation Pills?
    • Why active nav pills content not showing properly
    • Pills sticking together even when using margin - Tailwind
    • Bootstrap 4 nav-pills - how to set inactive pills to use outline
    • Boostrap v4.6 hide nav-pills until certain time of day, then hide again JS
    • Bootstrap Nav Pills content width
    • Pills with dropdown in Bootstrap5 works only once
    • Content not displaying on right side of vertical nav menu with nested sub-menu
    • Bootstrap Nav-pills not working correctly
    • Navpills to be aligned on right in media min-width: 900px
    • Bootstrap Pill Navigation not working on hosting
    • Bootstrap 4 Pills Nav with Dropdown Menus - Capture click
    • Keep active pill on refresh, Bootstrap 4

    Trending Questions

    • UIImageView Frame Doesn't Reflect Constraints
    • Is it possible to use adb commands to click on a view by finding its ID?
    • How to create a new web character symbol recognizable by html/javascript?
    • Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
    • Heap Gives Page Fault
    • Connect ffmpeg to Visual Studio 2008
    • Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
    • How to avoid default initialization of objects in std::vector?
    • second argument of the command line arguments in a format other than char** argv or char* argv[]
    • How to improve efficiency of algorithm which generates next lexicographic permutation?
    • Navigating to the another actvity app getting crash in android
    • How to read the particular message format in android and store in sqlite database?
    • Resetting inventory status after order is cancelled
    • Efficiently compute powers of X in SSE/AVX
    • Insert into an external database using ajax and php : POST 500 (Internal Server Error)

    Popular # Hahtags

    javascript python java c# php android html jquery c++ css ios sql mysql r reactjs

    Popular Questions

    • How do I undo the most recent local commits in Git?
    • How can I remove a specific item from an array in JavaScript?
    • How do I delete a Git branch locally and remotely?
    • Find all files containing a specific text (string) on Linux?
    • How do I revert a Git repository to a previous commit?
    • How do I create an HTML button that acts like a link?
    • How do I check out a remote Git branch?
    • How do I force "git pull" to overwrite local files?
    • How do I list all files of a directory?
    • How to check whether a string contains a substring in JavaScript?
    • How do I redirect to another webpage?
    • How can I iterate over rows in a Pandas DataFrame?
    • How do I convert a String to an int in Java?
    • Does Python have a string 'contains' substring method?
    • How do I check if a string contains a specific word?
    .

    Copyright © 2021 Jogjafile Inc.

    • Disclaimer
    • Privacy
    • TOS
    • Homegardensmart
    • Math
    • Aftereffectstemplates