• Resolved blazethefox

    (@blazethefox)


    Hi guys,

    I’m running a website with a few forms built in the free version of this plugin, lacking the premium version.

    We have two forms on the site which are meant to have a word limit (i.e. you cant submit the form unless it contains 100 words or more in the text field), but in the free version at least, this support isnt included.

    Does this functionality exist in the premium version? If not, is it something that could be added to it?

    Thank you

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Form Maker Support

    (@formmakersupport)

    Hi @blazethefox!

    Thanks for posting your question!

    This can be configured using Additional Attributes of Form Maker plugin. Edit your field and scroll down to Additional Attributes setting.

    If you configure an attribute with the following values, the limitation will be set:
    Name: maxlength
    Value: 100

    Let us know if this works.
    Thank you! Have a wonderful day!

    Thread Starter blazethefox

    (@blazethefox)

    Ahh almost what I wanted but not quite.

    What I’m actually looking for is a MINIMUM length. Sorry if I didnt make that clear.

    Thread Starter blazethefox

    (@blazethefox)

    Sorry, I accidentally marked as resolved the first time.

    I’m looking for a minimum word count. So, a user needs to type 100 words BEFORE they can submit it, rather than stopping them from posting with 100 words.

    Sorry if it wasnt clear the first time

    Plugin Contributor Form Maker Support

    (@formmakersupport)

    Hey @blazethefox!

    Unfortunately there are no default options to set up minimum length. However, this can be done with a few lines of custom Javascript code.

    Please post the link where you have published your form. I will ask our development team to provide the necessary script ASAP.

    Thanks! Have a wonderful day!

    Thread Starter blazethefox

    (@blazethefox)

    Thank you,

    We have two forms where we would like minimum word counts on. This nominations form –
    http://balticintranet.co.uk/monthly-award-categories-nominations-form/

    The second form is this one – http://balticintranet.co.uk/improve-it/

    I’ll disable the automatic login requirements so you can view them quickly

    Thread Starter blazethefox

    (@blazethefox)

    Just a heads up – I am unlikely to reply in fifteen minutes time. I’ll be heading home after that.

    You’re unlikely to get a response from me until tomorrow after that time.

    Thread Starter blazethefox

    (@blazethefox)

    Ah, I found where to put the javascript code, now I just need the code itself.

    Almost there guys, thanks for the support so far.

    Plugin Contributor Form Maker Support

    (@formmakersupport)

    Hey @blazethefox!

    Please add the following Javascript code to Form Options of your form, Javascript tab. Specifically, please write it inside before_submit() function:

    var words = jQuery("#wdform_14_element11").val().match(/\S+/g).length;
    if (words < 100) {
        alert("Your custom message here.");
        return true;
    }

    Note, that if you wish to use it for another form field also, you will need to place the ID of that particular field instead of #wdform_14_element11.

    Let us know in case you have further questions.
    Thanks! Have a good day!

    Thread Starter blazethefox

    (@blazethefox)

    Aha! Excellent!

    Thanks mate, thats spot on!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Minimum Word Count in a text box’ is closed to new replies.