简体   繁体   中英

Get simple CMS plugin

I am currently trying to modify a plugin that was made for get simple cms. The plugin is called "pages with comments". The reason I am posting here is because the topic for the plugin in the forums looks to be dead. Here is the link to the plugin I am currently using. https://mega.co.nz/#!pVcRnTiI!N0SyhLXrPbE1vFH3dNBaqO0zznETDD--QQpWp0c1EJoI have modified it but so you can see what code I am working with I am uploading it as a zip. My question is how do I make aa field required so when users submit the comment there has to be something in it. Either that or make that field a drop down. Thanks

        if ($capt =='Y'){
        echo '<div id="captch"> ';
            echo '<img alt="" class="capt" id="captcha'.$imfin.'" src="'.$siteurl.'plugins/pages_comments/img_cpt.php?url='.GSPLUGINPATH.'pages_comments/" />';
            echo '<input type="button" value="'.$i18n['reload'].'" onClick="javascript:rec_cpt(&quot;captcha'.$imfin.'&quot;,&quot;'.$siteurl.'plugins/pages_comments/img_cpt.php?url='.GSPLUGINPATH.'pages_comments/&quot;)" />&nbsp;<span class="msgavs">'.$i18n['rl'].'</span>';
        echo '</div>';
        echo '<div class="cap_input">';
            echo '<input type="text"  value="" name="guest[pot]" /><span>'.$i18n['Cpt'].'('.$i18n['Rf'].']'.'</span>';
        echo '</div>';
    }   
    echo '<div class="submit">';  
        echo '<input type="submit" value="'.$i18n['Ev'].'" name="guest-submit" />';
    echo '</div>';
if (empty($_POST["field_name"])) {
    $FieldErr = "FIELD is required"; //or any other error message
  } else {
    // code for submitting;
  }

// you can dispaly the error message using echo $FeildErr beside your field area

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM