NetTalk Central

Author Topic: Bootstrap and NT?  (Read 4221 times)

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Bootstrap and NT?
« on: June 01, 2020, 05:11:08 AM »
is possible to use a full bootstrap framework with NT? the current theme is it only a theme and in version 11.30 don't work or is broken, so i refer structure of bootstrap like a form, example:

<form>
  <div class="form-group">
    <label for="exampleInputEmail1">Email address</label>
    <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
    <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
  </div>
  <div class="form-group">
    <label for="exampleInputPassword1">Password</label>
    <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
  </div>
  <div class="form-group form-check">
    <input type="checkbox" class="form-check-input" id="exampleCheck1">
    <label class="form-check-label" for="exampleCheck1">Check me out</label>
  </div>
  <button type="submit" class="btn btn-primary">Submit</button>
</form>

or is possible create bootstrap html and reference a NT variable to a form?

Exist many and many themes in a market with bootstrap framework, JqueyUI is very limit and for me if no frendly like Bootstrap, in my personal opinion the only advance of H5 is use Bootstrap framework.

Thanks.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Bootstrap and NT?
« Reply #1 on: June 02, 2020, 07:48:14 PM »
The jQuery widgets being generated are not going to use bootstrap themes, because the css tags those widgets generate are for jQuery UI themes. So it's not like you can currently just flip a switch to use Bootstrap CSS because bootstrap has different names for all the classes, and many widgets in NetTalk do not have a bootstrap equivalent.

Obviously CSS is just CSS, you can lift any "look" you want and create your own theme, but while this is trivial to do I appreciate that some developers don't have the skill set to do this, and don't want to take a few hours to learn how to do it.

There may be changes to the styling in the future.

cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Bootstrap and NT?
« Reply #2 on: June 05, 2020, 05:14:53 AM »
thanks Bruce, but is possible create bootstrap html and reference a NT variables to a form?

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Bootstrap and NT?
« Reply #3 on: June 09, 2020, 03:48:08 AM »
Sort of, but why? Bootstrap can do forms but compared with NT its very basic. It just does the layout and client side validation. So no ajax. NT is all about ajax, you get to write server side code in Clarion. If you want to do server side validation using "plain" Bootstrap you need to write client side javascript and then some server side endpoints to help out. Its a total pain (I know as I've had to do it).

If you like the Bootstrap visual layout, you can combine this (mostly) into NT, and frankly that is easier than bootstrap forms. They are ok where no (or very very little server side stuff is required), think of a contact form or similar.

If your motivation for bootstrap forms is visual (including responsive layout) and your forms are complicated (server side validation), i'd recommend NT with bootstrap CSS.

If your forms are simple, merge your server side data into Bootstrap HTML and have it post back to a NetTalk Page that knows how to process it (pretty easy).

But, I don't think you can get the best of both, without some pain.


osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email