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

    "Undefined index" PHP error

    Asked by kmacharia on December 14, 2015 at 04:15 AM

    Hi, 

    I exported the form to Dreamweaver format and this is how the form attributes are for the date:

     <div id="cid_14" class="form-input-wide jf-required">

              <div style="display:none">

                <span class="form-sub-label-container" style="vertical-align: top">

                  <input class="form-textbox validate[required]" id="month_14" name="q14_dateOf14[month]" type="tel" size="2" maxlength="2" value="" />

                  <span class="date-separate">

                    &nbsp;-

                  </span>

                  <label class="form-sub-label" for="month_14" id="sublabel_month" style="min-height: 13px;"> Month </label>

                </span>

                <span class="form-sub-label-container" style="vertical-align: top">

                  <input class="form-textbox validate[required]" id="day_14" name="q14_dateOf14[day]" type="tel" size="2" maxlength="2" value="" />

                  <span class="date-separate">

                    &nbsp;-

                  </span>

                  <label class="form-sub-label" for="day_14" id="sublabel_day" style="min-height: 13px;"> Day </label>

                </span>

                <span class="form-sub-label-container" style="vertical-align: top">

                  <input class="form-textbox validate[required]" id="year_14" name="q14_dateOf14[year]" type="tel" size="4" maxlength="4" value="" />

                  <label class="form-sub-label" for="year_14" id="sublabel_year" style="min-height: 13px;"> Year </label>

                </span>

              </div>

              <span class="form-sub-label-container" style="vertical-align: top">

                <input class="form-textbox validate[required]" id="lite_mode_14" type="tel" size="12" maxlength="12" value="<?php echo $listpeople['dob'];?>" format="mmddyyyy" seperator="-" placeholder="mm-dd-yyyy" />

                <label class="form-sub-label" for="lite_mode_14" id="sublabel_litemode" style="min-height: 13px;"> Date </label>

              </span>

              <span class="form-sub-label-container" style="vertical-align: top">

                <img class="showAutoCalendar" alt="Pick a Date" id="input_14_pick" src="https://cdn.jotfor.ms/images/calendar.png" align="absmiddle" />

                <label class="form-sub-label" for="input_14_pick" style="min-height: 13px;">  </label>

              </span>

            </div>

    This is the script i have on my post submit page. 

    $dob = $_POST['q14_dateof14']['0']."-".$_POST['q14_dateof14']['1']."-".$_POST['q14_dateof14']['2'];

    I'm getting this error: 

    Notice: Undefined index: q14_dateof14 in /var/www/award/data/www/mis.awardfellowships.org/email/add_info.php on line 17 Notice: Undefined index: q14_dateof14 in /var/www/award/data/www/mis.awardfellowships.org/email/add_info.php on line 17 Notice: Undefined index: q14_dateof14 in /var/www/award/data/www/mis.awardfellowships.org/email/add_info.php on line 17

    Anybody who can tell me how to deal with it?

     

  • Profile Image

    Answered by Carina on December 14, 2015 at 10:07 AM

    I will take a deeper look into it, but in the meantime you can take a look at" rel="nofollow noopener"> this online guide on how to solve the "Undefined index" error code.

    Let us know if we can assist you further.