FoxInCloud
Bootstrap navbar in a form
Gravatar is a globally recognized avatar based on your email address. Bootstrap navbar in a form
  Michele
  All
  Feb 6, 2020 @ 07:03am

I have a form that contains a pageframe. In bootstrap mode all the pages tabs appears in this way in large size form

but when i reduce the size of the form in smaller devices the tabs appears in this way

I want to know if it is possible, when i am in bootstrap mode, to hide pageframe's tabs and instead to show a navbar like this

that in smaller device can appears in this way

The code to generate this navbar is this

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>

<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>                        
      </button>
      <a class="navbar-brand" href="#">Options:</a>
    </div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav">
        <li><a href="#">Page 1</a></li>
        <li><a href="#">Page 2</a></li>
        <li><a href="#">Page 3</a></li>
      </ul>
    </div>
  </div>
</nav>
  
</body>
</html>

I am not sure this is possible and if yes, where i have to insert this html code in my form ? I wish this navbar is shown before the pageframe and that executes the change of pageframe.activepage.

Someone can suggest me: is it possible ? in which object.wchtmlgen of the form i have to insert the code which part of the code i have to insert in the wchtmlgen where i need to insert the code where i definre the scripts to use

This is the first form i try to change in this way and any help will be appreciated

Thanks

Gravatar is a globally recognized avatar based on your email address. re: Bootstrap navbar in a form
  FoxInCloud Support - Thierry N.
  Michele
  Feb 6, 2020 @ 10:14am

We've done that before, will provide code tomorrow

Gravatar is a globally recognized avatar based on your email address. re: Bootstrap navbar in a form
  FoxInCloud Support - Thierry N.
  Michele
  Feb 6, 2020 @ 11:51pm

Ciao Michele,

you just need to set at design time yourPageframe.wBSlTabsCollapsible = .T.

Then you can fine position the hamburger menu using CSS in xxx.css

Gravatar is a globally recognized avatar based on your email address. re: Bootstrap navbar in a form
  Michele
  FoxInCloud Support - Thierry N.
  Feb 7, 2020 @ 12:47am

Perfect. With one simple parameter the result is this:

when collapsed

when expanded

Great job !

© 1996-2020