Appnitro Software Forums » MachForm

Customize "Disable Form" Message per form

(5 posts)

  1. 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 1 year ago #
  2. Yes, this can be done.
    Which embed code are you using to display the form?

    The standard form code or the advanced?

    Posted 1 year ago #
  3. I think the standard form? I don't think I have changed anything.

    Posted 1 year ago #
  4. Can you take a look at this?

    Posted 1 year ago #
  5. 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.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.