Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • merzbau Friend
    #161228

    I would like to know whether it would be possible to add some custom fields to the comment form.

    I need to add a radio group or a list, from which the user would have to choose one option before he can post his comment.

    I would also like (but it’s less important) to add a checkbox where the user could subscribe to the newsletter.

    Would that be possible?

    nghiatd Friend
    #380644

    Hello,

    If you want to add a radio group or a list,
    lease open file addnew.php in your jacomment theme (Default in link com_jacommentthemesdefaulthtmlcommentsaddnew.php), then you could find the code:

    <!-- BEGIN - TERM AND CONDITION -->
    <?php if($isEnableTerms) { ?>
    <li class="clearfix">
    <div id="jac-terms" style="clear: both" class="checkbox">
    <label class="jac-terms-confirm choice" for="chkTermsAddnew">
    <input type="checkbox" name="chkTermsAddnew" id="chkTermsAddnew" tabindex="7"/> <?php echo JText::_("I have read, and agree to abide by the");?> <a onclick="showWebsiteRules('<?php echo JText::_("Website rules");?>')" href="#" class="jac-link-website-rules" title="<?php echo "Website rules";?>"><?php echo JText::_("Website rules.");?></a>
    <div id="err_TermsAddnew" style="color: red;"></div>
    </label>
    </div>
    </li>
    <?php } ?>
    <!-- END - TERM AND CONDITION -->

    And add your code after it.

    @user could subscribe to the newsletter
    Please find the function [PHP]function addNewComment(){[/PHP] in file componentscom_jacommentcontrollerscomments.php to add your code to subscribe to the newsletter.

    Best Regards.

    merzbau Friend
    #383669

    Thank you very much

    peterjones1234 Friend
    #399813

    <em>@nghiatd 226751 wrote:</em><blockquote>Hello,

    If you want to add a radio group or a list,
    lease open file addnew.php in your jacomment theme (Default in link com_jacommentthemesdefaulthtmlcommentsaddnew.php), then you could find the code:

    <!-- BEGIN - TERM AND CONDITION -->
    <?php if($isEnableTerms) { ?>
    <li class="clearfix">
    <div id="jac-terms" style="clear: both" class="checkbox">
    <label class="jac-terms-confirm choice" for="chkTermsAddnew">
    <input type="checkbox" name="chkTermsAddnew" id="chkTermsAddnew" tabindex="7"/> <?php echo JText::_("I have read, and agree to abide by the");?> <a onclick="showWebsiteRules('<?php echo JText::_("Website rules");?>')" href="#" class="jac-link-website-rules" title="<?php echo "Website rules";?>"><?php echo JText::_("Website rules.");?></a>
    <div id="err_TermsAddnew" style="color: red;"></div>
    </label>
    </div>
    </li>
    <?php } ?>
    <!-- END - TERM AND CONDITION -->

    And add your code after it.

    @user could subscribe to the newsletter
    Please find the function [PHP]function addNewComment(){[/PHP] in file componentscom_jacommentcontrollerscomments.php to add your code to subscribe to the newsletter.

    Best Regards.</blockquote>

    Nice pice of script, much required ! 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 3 voices, and was last updated by  peterjones1234 13 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum