This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Customize "Disable Form" Message per form


  1. tania
    Member

    Hi -

    In looking through the forum I found how to change the default "disable form" message (http://www.appnitro.com/forums/topic/is-this-possible?replies=2#post-3318). However, I am wanting to customize the message per form id. For example, one form to have the message "We are no longer accepting entries." and another form has the message "The training is now full."

    Can this be done? If so, how?

    Thanks for your help!

    Posted 13 years ago #
  2. yuniar

    Yes, this can be done.
    Which embed code are you using to display the form?

    The standard form code or the advanced?


    MachForm Founder

    Posted 13 years ago #
  3. tania
    Member

    I think the standard form? I don't think I have changed anything.

    Posted 13 years ago #
  4. tania
    Member

    Can you take a look at this?

    Posted 13 years ago #
  5. yuniar

    Oops.. sorry! It seems I missed your last reply.

    Ok, it's quite easy actually. You only need to modify "includes/language.php" file.
    You can have it like this for example:

    switch($_REQUEST['id']){
      case 2 : $lang['form_inactive'] ='We are no longer accepting entries.'; break;
      case 5 : $lang['form_inactive'] ='The training is now full.'; break;
      default: $lang['form_inactive'] = 'This form is currently inactive.';
    }

    Using the above code, the form which has id number = 2 will display "We are no longer accepting entries." -- form which has id number = 5 will display "The training is now full." -- while the rest of the form will display the default message.

    You can add more lines as needed, just make sure to change the number with your form id number.


    MachForm Founder

    Posted 13 years ago #

RSS feed for this topic

Reply