Template fields format


Trying to figure out how to have same design based on the template i choose and i downloaded the min.css from here Bootswatch: Litera

and i would like to have some fields to look like this

Screenshot 2024-06-23 at 19.44.44

Now, is there a way to get the exact details from the template side ? and if so, how do i do that ?

Based on the template source code i have this

<div class="has-success">
  <label class="form-label mt-4" for="inputValid">Valid input</label>
  <input type="text" value="correct value" class="form-control is-valid" id="inputValid">
  <div class="valid-feedback">Success! You've done it.</div>
<div class="has-danger">
  <label class="form-label mt-4" for="inputInvalid">Invalid input</label>
  <input type="text" value="wrong value" class="form-control is-invalid" id="inputInvalid">
  <div class="invalid-feedback">Sorry, that username's taken. Try another?</div>

Now, how and what should i do in order to have exact same format ? do i need to create a web container and subclass each control and add those as web style or there is another way ?

Thanks a lot


Thanks a lot for the details. Seeing that things are not straight forward and if you need to do so many hacks and changes just to be able to use bits of the template then i wonder, what is the real use of that template ?

For me the idea of a template is that you dump that as we do now in the project and then you are able to use the template features in a easy way, so far the way i see it is kind of a headache more than a help and it should be re-designed i guess, to have a better usage.

Thanks again

All the Bootstrap templates offer features that Xojo still haven’t implemented.

We can ask for the features to be added to Xojo, like:
#70906 - Add Bootstrap validation to form controls
#74270 - Add Bootstrap form-floating option to WebTextFields/WebTextArea

but more time is dedicated to bugs and speed improvements. I hope Ricard can have less bugs to tackle and more features can be added to Xojo Web.

Right now, using different templates just mean changing the colors, fonts and general look of your web page. Adding a template to your project can’t add features not there yet. We need to code ourselves, use JavaScript, CSS, or use WebSDK controls like Graffitisuite.

as a rule in OOP, is to always subclass one class before you use it.
so I have a subclass of WebTextField in all my web apps. And it is an external item to use in many projects.
and in that subclass I implemented a property for validation, using the code provided in my previous post.
so now, I can use it easy in all my web projects with just selecting a property value, in the IDE or by code.

I agree that these features should be included in xojo web framework, but in the mean time you can use it easy in your own code. the feature request has been made, just wait for it.

1 Like

while i get the point, but what kills me is this “we launched Web, we have now templates”,but they do nothing, if you want things, “file a feature request” which is fun, and in the same time understandable, but in the same time when you implement a feature, have it complete, specially that this is really needed, nobody wants or accepts anymore apps looking like '70 or windows 95 era, they all want fast, looking proper and do the proper job. so if you implement a feature that need to spend a lot of time just to have it work than that is not a feature, is a workaround . as Alberto said as well, we need to use Java, css, websdk, then why not doing all in something else which is already done and could be deployed super fast .
Hopefully you get the point, as well Xojo.

I’m looking on things on feature requests checked and over checked for years, and reviewed then cancelled then forgotten , no idea how that thing works. but so far we need something that can develop professional solutions not hobby like ones. And some pay big bucks every year with the hope that we will see some changes soon. but we keep on getting delayed.

I launched a big web project at the time web 2 just came out.
I had the choice to still use web1 (and I would be screwed now…)
or use web2 and face the consequences …
using this method of doing my own classes and a good bunch of websdk,
the project is perfectly fine today…
(and I have a good advance in functionnalities in my web design compared to xojo web !)

ps: I also use this method for xojo desktop and really appreciate it too

As you are discovering Xojo web potential and limitations, you are at the point that you need to decide if you prefer to use other tool or use Xojo. Some things work and some Bootstrap features are not implemented. I can only say good things about Ricardo (fixing bugs, speed improvements, new features), I just wish there were 3 or more Ricardos working at Xojo :slight_smile:

We try to help when possible to make your web app work as you want. Some people have their own solutions either free, as 3rd party plugins (Graffiti) or not for sale. Anthony offers a lot of free help in the forums besides the plugins. Jean-Yves also offers some of the WebSDK free but others are not public.

If you decide to stay with Xojo and you need something, let us help you get what you need. If you have bigger needs you may look into Graffitisuite web and I’m sure Anthony can deliver other fixes/features too.

Good luck in whatever you choose.