How to embed Flatprickr in a symfony form? - symfony

I got the flatpickr cdn, I initialized the datepicker. It works perfectly with an HTML form.
However, I can't integrate it into a Symfony form.
I tried passing an attribute id but it doesn't work.
I searched on stackoverflow but couldn't find an answer. If anyone knows the solution that would be great.
render
FormType
JS`

Related

How to set minDate for flatpickr/Ninja Forms?

I kinda asked this question already but have not gotten a solution, so I am giving this another try...
I am using the WordPress Plugin ninja forms and have a datepicker. I want to disable any past dates, so that the user can only select the present or future dates in the datepicker.
I googled this a lot but from what I am understanding most posts about this won't work anymore since Ninja Forms changed its datepicker plugin from pikaday to flatpickr.
I know that I need to set "minDate" to today but I don't know how to select the datepicker field. I am attaching a screenshot of the HTML that the plugin produces. If anyone can help me with this, that would very much appreciated!!
You can modify the settings in javascript like in this documentation: Flatpickr documentation
But I'm facing the same issue because I can't make this code work on my site. I think it's the loading order or something like that... Anyway, hope this will help you!

how to adapt drag drop Formbuilder to Meteor

i'm trying to adapt http://bootsnipp.com/forms and http://dobtco.github.io/formbuilder/ to Meteor.
Meteor seems to be strugglinh with Html template files of both of these FormBuilders.
any pointers on how i can adapt one these to my MeteorJs application ?
I'm looking for the same integration. If you could find any solution please write it down here.
By the time, not the drag&drop but kind of dynamic form can be created through
https://github.com/aldeed/meteor-autoform
fyi

The Text Formatting Toolbar symfony

Hiii,
I wanted to know if there are Text Formatting Toolbar for symfony to integrate into my textareas.
Someone can help or show a path.
Thanks for your help.
I guess, you are looking for something like TinyMCE.
Your question actually has nothing to deal with Symfony2 since it is client-side oriented.
Take a look at this bundle
https://github.com/genemu/GenemuFormBundle
It adds several new form fields to symfony forms, including a Tinymce form field which is what you need.

How to pull Facebook news feeds onto website using ASP.NET

There seem to be various example using PHP, but need a concrete example of how to do this using .NET.
Facebook seems to be a pain and does not have an easy method like Twitter where you use a widget and it creates the code for you to integrate into your HTML.
Any suggestions appreciated.
If you're happy to use widgets, like the Twitter widget, you can access facebook widgets here:
http://developers.facebook.com/docs/plugins/
Facebook provide api for it. Please refer this
https://graph.facebook.com/me/feed?access_token=your_access_token

Drupal Hooks (hook_form_alter)

I’ve a question about Hooks. Being kind of new to Drupal I haven’t had much experience with hooks but a friend of mine suggested to get familiar with it and learn it to solve one of my problems on my site.
The thing is, that I have a module fbconnect which I use for users to connect via Facebook and use their profile picture at Facebook, on my site.
Everything is working, I’ve two checkboxes which and the connection and profile images works quite well but the problem is that above the two checkboxes I want a descriptive text to appear.
The only way I so far have to put in this text is to create a “description” field to the first checkbox. Unfortunately, it chooses to display this text beneath the checkbox so now it look kind of strange with a checkbox, a 3-4 lines descriptive text to the entire Facebook function, and then another checkbox.
If hooks are the right way to go to solve this problem, how do I actually do it and where do I actually insert the hook? I can imagine that it is the hook_form_alter function I need to have and in my fbconnect module the function fbconnect_form_alter exists but where I go from here I really have no idea.
I’ve tried to read up and see some instruction videos about hooks but I’m still puzzled about this apparently very nice feature in Drupal.
I'm using Drupal 6 for this site.
Any help or advice would be very much appreciated.
It sounds like you might also need to look at the Theme system in Drupal. In particular, take a look at theme_checkbox. From glancing at the code, there seems to be a label that is rendered after the actual checkbox. In your custom theme function or theme file you can try changing the order of the two.
In drupal, a "hook" is the way to interact with some piece of code.
In you have a hook_bar() hook, and is your module named 'foo' implements foo_bar(), then this function is executed.
In your case, you'll need to create a module, and impletements hook_form_alter()
You can find a tutorial there that show you how to add a checkbox. If you need to add some text, you can use the same method, except instead of adding a checkbox, of course, you just add a textfield
Here is an awesome beginner's video about adding custom hooks with the example of hook_form_alter from Drupalcon Chicago 2011 which is perfect for this situation and will hopefully help you in this. As a newbie to Drupal it surely helped me and I would highly recommend watching other videos. Thanks to the drupal community for posting these.
http://chicago2011.drupal.org/sessions/introduction-module-development

Resources