<commit_before>***************
Getting started
***************

All you need to start creating forms is::

    $(body).append('<div id="replace_this_with_my_form"></div>');

    var my_form = new gocept.jsform.Form('replace_this_with_my_form');
    my_form.load('/form_data.json');


This will inject the form in the container with the id ``replace_this_with_my_form``, load the form data via *ajax* from the url
``form_data.json`` and create input fields according to the content of ``form_data.json``.

``form.load()`` accepts JavaScript objects as data or a url (like in the
example above). It then guesses, which field widget to load by means of the
datatype of your field::

    my_form.load(
        {firstName: '', // will result in a input field with type="text"
         title: [{id: 'mr', value: 'Mister'},
                 {id: 'mrs', value: 'Miss', selected: true}], // will result in a select box
         needs_glasses: false}); // will result in a checkbox

`gocept.jsform` comes with basic templates for these three use cases. Of cource
you can provide your own templates for either the form or the fields itself.<commit_msg>Doc: Make body a selector string rather a variable.<commit_after>***************
Getting started
***************

All you need to start creating forms is::

    $('body').append('<div id="replace_this_with_my_form"></div>');

    var my_form = new gocept.jsform.Form('replace_this_with_my_form');
    my_form.load('/form_data.json');


This will inject the form in the container with the id ``replace_this_with_my_form``, load the form data via *ajax* from the url
``form_data.json`` and create input fields according to the content of ``form_data.json``.

``form.load()`` accepts JavaScript objects as data or a url (like in the
example above). It then guesses, which field widget to load by means of the
datatype of your field::

    my_form.load(
        {firstName: '', // will result in a input field with type="text"
         title: [{id: 'mr', value: 'Mister'},
                 {id: 'mrs', value: 'Miss', selected: true}], // will result in a select box
         needs_glasses: false}); // will result in a checkbox

`gocept.jsform` comes with basic templates for these three use cases. Of cource
you can provide your own templates for either the form or the fields itself.
{'fraction_non_alphanumeric': 0.13006029285099052, 'fraction_numerical': 0.0, 'mean_word_length': 3.8598326359832638, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5917411', 'n_tokens_mistral': 658, 'n_tokens_neox': 649, 'n_words': 287}