• Resolved jadeye26

    (@jadeye26)


    Hello
    When submitting empty form no error messages are displayed.
    Nor could I find where to mark form input fields a must so maybe it’s not verifying anything???
    Update:
    So ‘required’ is in code,
    public.js is loaded yet no error messages appear on empty submit.

    • This topic was modified 3 years, 10 months ago by jadeye26.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jadeye26

    (@jadeye26)

    Ok…..had no time so dug in…
    Pay attention if you’re facing similar issues:
    1. since I chose to design my own css, I didn’t realize that the public.js script wass adding a css class that I didn’t have.
    I had to add:

    .dk-speakout-error {
      background-color: #ffebe8 !important;
     /*  border: 1px solid #e81e00 !important; */
       box-shadow: 0px 0px 0px 1px rgba(255,0,0,1) !important;
    }

    OR

    .dk-speakout-error {
      background-color: #ffebe8 !important;
      border: 1px solid #e81e00 !important;
    }

    To my custom css.

    2. Email wasn’t getting rectified as an error when empty.
    Same speakout/js/public.js code:

    THIS FIRST ROW I COMMENTED AND ADDED THE ONE UNDER TO NEUTRALIZE hide_email_field === 0 WHICH IS INITIALIZED WITH 1 (don’t have time to dig out why…)
    `// if email is empty or doesn’t fit regext and IS being displayed
    if ( ( email === ” || ! emailRegEx.test( email ) ) && hide_email_field === 0) {
    if ( email === ” || ! emailRegEx.test( email ) ) {
    $( ‘#dk-speakout-email-‘ + id ).addClass( ‘dk-speakout-error’ );
    errors ++;
    }’

    Plugin Author SpeakOut!

    (@123host)

    In the setup information I give instructions:

    How can I create a custom style for the petition form?
    
    First, select “None” as your theme on the Settings screen. Then add a petition.css file to your theme folder. You can use the styles included in the plugin’s CSS folder as a starting point for your custom theme — just copy the contents of theme-standard.css or theme-basic.css into your petition.css file and make any modifications you desire.

    It explains that you should copy the contents of the original CSS and modify them.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘URGENT – Petition form doesn’t display errors – petition already in the air’ is closed to new replies.