Giter Site home page Giter Site logo

mform's People

Contributors

ruudkobes avatar stephanwagner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mform's Issues

Error on condition

Line 388.
this.optionsAmount.visible = ...
reading this.optionlist.length throws an error, because optionlist is not defined.
This condition triggers only for certain number of options in the list, so it is not that obvious to run into. In your demo, for "select country", have number of option be 11 or 12 and you will see the issue.

Modal window, mForm.Element.Select problem

When I have a normal select field that needs to be shown in a modal window, it wont unfold.

<form>
        <select data-select>
            <option value="1">yes</option>
            <option value="2">no</option>
        </select>
</form>

I did found a solution, and that is to remove data-select out of the select element and create it with
new mForm.Element.Select();

Only problem then is that you have to add a delay.
(function() { new mForm.Element.Select(); }).delay(1000);

Here is the script: http://mijngamepc.nl/mboxmform/mBox.Advanced.js line 90

As you can see, if a select field has the title attribute it will do a JSON request and build the select field (options) from that data.

So if other people have the same problem, this is a solution.

new mForm.Element.Select(); placeholder problems

My forms will hide automatically at dom ready and when a Modal windows is initialized the form will be shown correctly (when a form is styled with: display: none; the form won't show correctly, so this is my little fix).

$$('form.mForm,form.mFormAuto').each(function(formelements)
{
formelements.setStyle('display', 'none');
});

Now when a modal window with a form is being initialized there are some JSON requests that will get the data for making the select fields.

The form standard contains the next code:

select name="devicetype" placeholder="Type Apperaat" name="type" title="ajax/AjaxGetDeviceTypes.php" data-required style="width:275px"></select

the new options are injected and with the help of

new mForm.Element.Select({original: selectid, search: false, noSearchResults: 'Geen resultaten', placeholderSearch: 'Zoeken...'});

it will make a nice select with a nice placeholder. But when i want an option be selected as default it wont work and I'll get the next error:

this.select is undefined

this.select.removeClass(className);

so when I remove the attribuut 'placeholder' out of the select element it will create that error. I can't make a fix. So is this a bug? Or is there a temp fix? Version 0.2 also didn't solve it.

Demo not working in Windows IE11 browser

Hi,

 I have download the StephanWagner-mForm-0.2.6-0-gbd88dd1.zip file and just extract it and open the index.html inside Demo Folder.

It's working awesome in many browsers but drop-downs doesn't working in IE11, but it's working in http://htmltweaks.com/mForm.

Can you please have a look on it ..

Required fields red dots won't disappear

As you may know my modal windows contains form elements. These form elements are cloned from a original one so I can have unlimited amount of modal windows.

The only problem is now that when input field is filled in the red dot wont disappear. Also on select fields, I have to select a item twice before the red dot goes away.

Here is an image: http://mijngamepc.nl/mboxmform/Naamloos.png

Changed some dutch words into English. But as you can see the red dot from an input field won't disappear at all. The first select fields doesn't has a placeholder so there will be a option selected as default and there isn't a red dot which is good. But the last select field isn't working good and an option has to be clicked on twice.

Version 2.5 did solve the following issue: #1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.