How to set minDate for flatpickr/Ninja Forms? - wordpress

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!

Related

Twigmo custom style files

did anyone ever customize the Twigmo addon basic theme for cs-cart? I am trying to write custom css files for font size and color. What I tried:
Using the visual Editor: after working for like 2 hours changing the styles, I tried saving and apparently my current subscription doesn't allow me to do custom files using visual editor
I tried searching for other solutions: fell on this twigmo skin editing which basically tells me to create a custom css file called custom{theme-name}.css. I did but i still can't figure out what classes the twigmo for what. Does anyone know where i can find this? i am also posting a question on the forum to see if they can help me.
Thank-you in advance. hope my question is clear enough.
The free "Starter" Twigmo subscription plan doesn't provide an ability to customize CSS. You have to subscribe for any paid plan. In this case the visual editor will be available for you. Also you will be able to write your custom CSS code in the visual editor.
Regarding your second solution - it is for old version and doesn't work for the Twigmo 3.x.
Hovewer you can modify the design/themes/[your_theme]/templates/addons/twigmo/mobile_index.tpl file. You can add your CSS code there. It is not the most convenient way, but it is free.

angular-ui bootstrap datepicker multiple date selection

It seems lite angular-ui/bootstrap/datepicker cannot be configured for multiple date selection.
Is there someone who have implemented a hack or have a good idea where to start modifying the source to enable selection of multiple date in a single datepicker?
I've googled for this same answer today and found this:
https://github.com/spongessuck/gm.datepickerMultiSelect
I noticed that the project initial commit is newer than this question and maybe you already solved the problem, but the link can be usefull to someone reading this.
You may try this plugin: MultipleDatePicker
MultipleDatePicker is an Angular directive to show a simple calendar allowing user to select multiple dates with a bunch of options to customize it.
GitHub link

How do I to use Jquery Quicksand with pagination or filtering wordpress query with jquery/ajax?

Currently I have a website working with Wordpress and Jquery Quicksand.
However I don't want to show all posts at the same time. I wish to show e.g. 6 posts and then have a pagination. And that's where I get the problem.
If I have a filter on the first page with posts, it just filters those posts, and not the ones on the other pages. Like this (example from tutsplus.com)
And that's not intuitive at all. Not being able to navigate from one page to another within a filter is just not userfriendly.
I haven't found any tutorial on this, but I found a working example, using quicksand. So it is possible.
So I was wondering if someone might help me, or possibly have a better solution that the working example?
The reason I added ajax in the title is because I thought it might be a better solution doing a new wp_query via ajax instead of loading all posts in multiple lists and show/hide them with the filters.
Here's a tutorial to the working example you found:
By the common use of libraries and functionality it seems they followed it step by step.
Use Masonery or it´s bigger brother Isotope.
(this is also what the example you have posted is using .
Neither Isotope or Masonry support pagination as mentioned in Isotope main site.

Add Additional Fields when Creating a Post within Wordpress Dashboard

All,
I'm trying to create additional fields and I've done a little research on this already and found that you should use the add_meta_box().
However, I looked at the wordpress Codex but I'm not sure where I should implement this. Here is the link to that:
http://codex.wordpress.org/Function_Reference/add_meta_box
I'm not sure which file I need to alter to add a simple text box. Can someone point me in the right direction to what file to update and what is a good way to go about doing this?
Ideally, I'd like to save this into a table. Is it better to create a custom table for this for upgrades of Wordpress? If you have any pointers on how to save the data that would be great as well!
Thanks so much for any advice you might have! I appreciate it!
You can also use this plugin.
this is easy to use.
http://wordpress.org/extend/plugins/verve-meta-boxes

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