ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

exp:comment:form + onsubmit

June 03, 2009 6:13am

Subscribe [2]
  • #1 / Jun 03, 2009 6:13am

    dolmance

    101 posts

    Hi, I need to add a javascript parameter to my comments form in order to validate a checkbox. I’ve added this code but it is not being displayed:

    {exp:comment:form weblog="weblog" onsubmit="return validate_form(this);"}

    Thank you.

  • #2 / Jun 03, 2009 6:25am

    Ingmar

    29245 posts

    I am afraid there is no onsubmit parameter for the exp:comment:form tag. Perhaps you could create the form yourself, like an SAEF? Moving to Howto.

  • #3 / Jun 03, 2009 7:24am

    dolmance

    101 posts

    The problem is that if I create a form myself, I don’t know how to save the user information for further submissions.

  • #4 / Jun 04, 2009 6:02am

    dolmance

    101 posts

    I’ve solved this problem adding the function on a button instead of the form tag. Thanks.

  • #5 / Jun 04, 2009 6:03am

    Ingmar

    29245 posts

    Very good idea, actually 😊 Thanks for letting us know.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases