We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46886
    • 1,154 Posts
    Ok so here in this forum, new posts and edited posts have automatically checked boxes, while quickreply form does not.

    While on my installation, *all* default to empty, however I may have changed that: http://forums.modx.com/thread/95866/change-defaults-for-thread-subscribe

    This question has been answered by nuan88. See the first response.

    • discuss.answer
      • 46886
      • 1,154 Posts
      Ok this is pretty much figured out. The defaults in the 'default' theme all work but are all unchecked.

      It is the 'modx' theme that has default checked box on both new post and modify post. The button does work and can be unchecked. Sort of seems like they decided they really wanted that default checked, as it hard coded.

      So anyone using the default theme can rest easy, everything works fine actually. The below code is all just [[+notify_cb]] in default theme.

      It also seems clear that the default theme is newer than the modx theme, in the code you can see that they cleaned up and fixed some stuff between them. So it might be a better practice to always start with the default theme. But presumably both of them use one tpl for new and modify, and another one for quickreply. Strangely, there are comments in the first one indicating it was actually intended to be the second one, somewhat misleading comments.

      For modx theme, the issue was this:

      New code (copied from core/components/discuss/themes/modx/chunks/post/disquickreply.chunk.tpl)
      <label class="dis-cb">
      <input type="checkbox" name="notify" value="1" [[+subscribed]]
      tabindex="38" />[[%discuss.subscribe_by_email]]
      </label>

      Old code (core\components\discuss\themes\default\modules\replyform.chunk.tpl:
      <label class="dis-cb">
      <input type="checkbox" name="notify" value="1" checked="checked" />[[%discuss.subscribe_by_email]]
      </label>