Closed cpidx closed 12 years ago
The demo is a showcase of everything that's possible. What are you trying to do? Here's the simplest example I can think of. Make sure to load Ideal Forms into your project first. Hope this helps:
HTML:
<form id="myform">
<div><label>Username:</label><input type="text" name="user" class="required username"/></div>
<div><label>Password:</label><input type="password" name="pass" class="required pass"/></div>
<div><label>E-Mail:</label><input type="email" name="email" class="required email"/></div>
</form>
jQuery:
$('#myform').idealforms();
If you want to use a custom path for your images instead of the default less/themes/basic
you need to recompile the project into CSS. Follow this instructions:
less/themes/basic/basic.less
less
folder into the app and check jquery.idealforms.less
only, which links all other files. The above can seem over-complicated if you're not familiar with CSS Preprocessors, like LESS, but it provides way more flexibility.
Thanks - I figured it out now. It appears this plugin doesn't work well with Twitter Bootstrap. It's very nice though! Please let me know if you plan to offer a Twitter Bootstrap friendly version.
No, it doesn't work very well. Twitter Bootstrap for some reason opted to use global css styles in form.less, styles that are beyond a reset or normalizer, and even more problematic is that most of the values are set in pixels. Ideal Forms uses the namespace ideal
just like jQuery UI uses the namespace ui
for example; I don't understand why Bootstrap doesn't follow this common practice.
I don't plan to add support right away, because I'm working on other stuff that I consider more relevant, but I might add it in the future.
For now, your best option to make it work properly would be to remove all the form related stuff from Bootstrap. You can do this in two ways:
forms
under "Base CSS".less/bootstrap.less
and remove the line @import "forms.less"
bootstrap.less
into CSSUnless there are some other global problematic styles elsewhere this should do it.
That worked great! Thank you.
I've tried following the directions in the documentation at least 10 times and can't get this plugin to work. Is it possible to add a couple demo.html files to the project to show how to do a simple and complex implementation?