What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Can we have different subject set on the same form?

    Asked by didavy on September 23, 2015 at 07:10 AM

    I use one form and import this by php include on more pages.

    Is this possible, to use different subject depends on page?

    Example:

    form.php incuded by action.php: subject: action
    form.pho included by clients.php: subject: your request

    etc.

     

    Thank you in advance

    didavy

    different same form one form subject email subject
  • Profile Image

    Answered by Ben on September 23, 2015 at 11:20 AM

    I am not quite sure what you mean about the php includes being used to show the form pages (I know what PHP includes are). I presume that you have grabbed the source code of your form and that you are now showing different pages in different php scripts.

    Now regardless of how the form is shown - if it is loaded from our website or loaded through your own php code, the subject must be set in the Form Builder, email notification.

    Now idea comes to mind, which is to add a field to your form, which will pass its own value as a subject, while the field is hidden from the user.

    You can see more about passing the value to the subject here: How to place form title in the Subject Line of form notification?

    Now instead of using {title} you can just use the tag of your own hidden field, which you can find out by following the steps here: How to find Field IDs & Names

    Do let us know how it goes for you.

  • Profile Image

    Answered by didavy on September 23, 2015 at 11:36 AM

    Hello Ben not at all...

    I put the source code from the form in different files.

    Form works.

    The problem is the subject of an e-mail. Because is about only one form (not two) with the same fileds I have the same notifications and recepients. This is okay. But what I want is the variable subject, depends on the page where the form coming from  (see screen)

    It is possible, to change subject in the form directly (hidden field etc) or only in the form editing mod?

    Thank you

     

  • Profile Image

    Answered by didavy on September 23, 2015 at 11:38 AM

    perhaps its explains better:

  • Profile Image

    Answered by Ben on September 23, 2015 at 01:07 PM

    It is possible, to change subject in the form directly (hidden field etc) or only in the form editing mod?

    Yes, you can change the value of the field, while you must first set the email notification subject in the Form Builder to use the value from this field.

    For example, you create and hide a field called "subject".

    Now, we use this guide: How to find Field IDs & Names and find out that this new field has its tag like this: {subject} and we add this into the email notifiers subject as explained here (but instead of {title} we add {subject} ): How to place form title in the Subject Line of form notification?

    Now we made a change in the form builder - this is a one time change that we just did.

    Now in your clients.php, you set the field value attribute to say "Clients" and then set the value of the same field, but in misc.php to "Misc".

    Once submitted, if you submitted the form from the misc.php, the subject will say "Misc", while if you submit the same form, but through the clients.php, it will state "Clients" in the subject of the email that is delivered.

    So the change in the form builder is one time, while you can set the value of this field in your form as many times as you want / need.

    Do let us know if you happen to have any additional questions.