Comments (21)
Here is my initialization for simple_form and materialize
https://gist.github.com/gudata/d3fb9e480ffe6190e0803993b9fcdd13
It is draft because I haven't cover ALL the components. But a majority of them are working.
from materialize-sass.
my small config =>
https://gist.github.com/mediasota/7c46c8e105acc386d62f
from materialize-sass.
@mediasota , could u provide dummy app with example of generated form to test it? It would be perfect
from materialize-sass.
@mediasota , ха, спасибо, проверю чуть позже
запушил в rubygems патч с пагинацией.
from materialize-sass.
Any updates on this one?
I'd happily take this if its not being worked on.
from materialize-sass.
@gizotti you are welcome!
but probably we should do generator as separate gem 'simple_form-materialize' as R.Franca mentioned in this issue:
heartcombo/simple_form#1198 (comment)
from materialize-sass.
@xamenrax
I think the generator could be part of the materialize-sass gem, it would just create an initializer with the simple_form configs and would be run only by people that want to use simple form with material.
from materialize-sass.
agree with @gizotti. All we need is to design simple_form wrappers that are compatible with materialize.
from materialize-sass.
I'm integrating materialize css in one of my projects and will work on the simple-form wrappers soon. I'll send a PR when I get the wrappers right and write a generator.
Gabriel Gizotti
about.me/gizotti
On Fri, Apr 24, 2015 at 1:09 PM, Mohd Khairi Mohd Adnan
[email protected] wrote:
agree with @gizotti. All we need is to design simple_form wrappers that are compatible with materialize.
Reply to this email directly or view it on GitHub:
#16 (comment)
from materialize-sass.
Very nice! Looking forward to this addition.
from materialize-sass.
Someone has any progress to share?
from materialize-sass.
I'm using MaterializeCSS in many projects here, but I've any solution to management of error handling, anyone has a good config to share?
from materialize-sass.
Anyone got anywhere with this?
I've created a Rails 4.3 app using materialize and simple_form to create a basic contact form shown below. If I use form_for
and submit the form with errors they are wrapped when the page reloads. However when I use simple_form_for
the errors (and the tags which contain them) do not appear.
This is with no changes to the initializer file. Any ideas?
Also as you can see I'm having to write out the labels which I thought simple_form would do for me by default.
<%= simple_form_for @message, url: contact_path do |f| %>
<%= f.label :name %><br>
<%= f.text_field :name %><br>
<br>
<%= f.label :email %><br>
<%= f.text_field :email %><br>
<br>
<%= f.label :subject %><br>
<%= f.text_field :subject %><br>
<br>
<%= f.label :message %><br>
<%= f.text_area :message %><br>
<br>
<%= f.button :button, "Custom Button Text" %>
<% end %>
from materialize-sass.
I did get somewhere with it, and got it most of the main inputs working well, just got caught up with work and couldn't get the pr sent yet as I promised :/ my bad.
@patricklindsay: about your problem. It's happening because you are using the form_for syntax inside a simple_form_for block.
<%= f.input :email %>
would create the label and the input for u.
from materialize-sass.
Great cheers @gizotti that sorted both issues. I'll use @mediasota config and go from there for now.
from materialize-sass.
@gizotti Thank you for your help to the community!, Do you have any news with the PR?, or a WIP example, that can we use or improve?
from materialize-sass.
Any news about this feature?
from materialize-sass.
+1 need this feature :)
from materialize-sass.
I've began to work on a gem which includes the SimpleForm configuration generator and custom inputs. Take a look here, SimpleForm-Materialize
I'm currently having difficulty adding the custom widgets I've created, check out the stackflow question
from materialize-sass.
Is there a way to get as: :select to work on this?
= f.association :tutor, collection: Tutor.all, label_method: :name, value_method: :id, as: :select
from materialize-sass.
Hi there. What about config for materialize v1? I am particularly interested in config for check_boxes.
from materialize-sass.
Related Issues (20)
- QUESTION: Using turbolinks causing sideNav issues with browsers back action HOT 1
- Thumb with the range is out of view HOT 1
- Support v1.0.0-beta HOT 2
- helper-text styling is off HOT 2
- JavaScript evens are not initialized since 1.0.0-alpha.1 HOT 3
- Usage step A causing "Fail to import not found or unreadable" HOT 6
- sideNav is not a function HOT 2
- Why no helpers? HOT 2
- undefined variable HOT 1
- Forms are broken in 1.0.0.rc2 HOT 3
- $map: #007bff is not a map for `map-has-key' HOT 4
- Sidenav-overlay active with sidenav-fixed HOT 3
- not upgraded the gem version yet HOT 1
- Navbar module not working.... HOT 3
- update materialize.js HOT 1
- How do I access the Materialize 'M' backup? HOT 1
- Rails Webpacker HOT 3
- DatePicker closes immediately when clicked on in Chrome HOT 3
- Warning when using Rails 6 zeitwerk autoloading
- Publish new release? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from materialize-sass.