-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form doesn't seem to work in partial #83
Comments
Hey @Siggs2000, thanks for opening the issue, also thank you for posting code related to it. If I understand correctly, your form fields do not render, but submit tag renders (and it's not functional)? |
@nikolalsvk - that's exactly right. Some other info: My initializer is set with the following:
If I load the partial in the browser directly (ex: |
@Siggs2000 did you make a typo in your code examples? You reference Also, in your initial post I think there is an extra Can you share the actual rendered html you are seeing? Does it not have any form tag at all? No Select tag? No Repo Name? Just a submit, but it does nothing? |
I sure did @nightsurge. I tried to simplify the code for the question and messed that up a bit... The form works just fine when I load the partial alone in the browser at |
It looks like I've solved this issue. I'm using Materialize CSS and I had to reinitialize the form in the partial that I'm loading via render_asyc. The main init for the materialize js elements are in my application.js file and so I'm not totally sure why they aren't working in the partial but sure enough... If I add the initializer commands inside of |
Great to hear that you've managed to solve the issue. The reason why Materialize didn't "work" on your code in the partial is because it didn't run after the partial was loaded. In other words, the partial with the form loaded, but it didn't go through Materialize. Again, this is just a guess from my side. If you're OK with it, I'd close this issue since you got it resolved. If you want, you could create a PR to README with your use case with that library you're using with code and an example. It may help someone in the future :) |
Hey all, love this gem!
I'm getting a confusing issue for one of my uses though. In my partial, I'm loading a table of data and in each row, I have a form_tag. This works nicely in my old, regular partial but when I load it async, using this gem, the form fields don't render and the submit button doesn't trigger any action when pressed.
Here's an example of my code:
The text was updated successfully, but these errors were encountered: