contact_form subject bug

Even tough I cant use the Contact form as it is for some reason talked about in another thread..

I noticed that the Subject field does not show on the page even when ticked in required or show.

if set to required the system gives an error stating to put in a subject even if the field is not there.

Try re producing this bug by for example only choosing subject and message, it seems for some reason be visible when some other fields are selected as well.

Comments

  • acrylian Administrator, Developer
    Thanks, that is indeed another bug. I will see to that.
  • glad to know one other person noticed that so i don't look like a complete tard thinking it was something i did hehe
  • I don't know if this has already been seen to but the fixed section of /zp-core/plugins/contact-form/form.php is below. The problem was that the if(showOrNot... wasn't closed properly because of an omission of <?php } ?> and the if(showOrNot... for the subject wasn't included. See below.

    <?php if(showOrNotShowField(getOption('contactform_phone'))) { ?>
    <tr>
    <td><label for="phone"><?php printf(gettext("Phone%s:"),(checkRequiredField(getOption('contactform_phone')))); ?></label></td>
    <td><input type="text" id="phone" name="phone" size="50" value="<?php echo $mailcontent['phone']; ?>" /></td>
    </tr>
    <?php if(getOption("contactform_captcha")) { $captchaCode=generateCaptcha($img); ?>
    <tr>
    <td><label for="code"><?php echo gettext("Enter Captcha*:"); ?>
    <img src=<?php echo "\"$img\"";?> alt="Code" align="bottom"/>
    </label></td>
    <td><input type="text" id="code" name="code" size="50" />
    <input type="hidden" name="code_h" value="<?php echo $captchaCode;?>"/></td>
    </tr>
    <?php } ?>
    <?php if(showOrNotShowField(getOption('contactform_subject'))) { ?>
    <tr>
    <td><label for="subject"><?php printf(gettext("Subject%s:"),(checkRequiredField(getOption('contactform_subject')))); ?></label></td>
    <td><input type="text" id="subject" name="subject" size="50" value="<?php echo $mailcontent['subject']; ?>" /></td>
    </tr>
    <?php } ?>

  • Seems fixed in the development streem. Always a good idea to check that source when you come across a problem. We may have already fixed it.
Sign In or Register to comment.