Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
I have a form that has a relational field.
I am unable to send the value of the relational field in the send_mail tag on mail. Rest all values are being sent on the mail.

My send_mail code is:
Code: Select all
<cms:send_mail from=k_email_from to=k_email_to subject='New Registration for Yatra' debug='1' html='1'>
                     <html>
                        <head>
                           <link rel="stylesheet" type="text/css" href="<cms:show k_site_link />assets/css/bootstrap.css" />
                           <link rel="stylesheet" type="text/css" href="<cms:show k_site_link />assets/css/gxcpl-iskcon.css" />
                           <style type="text/css">
                              body {
                                 margin: 20px auto;
                                 background-color: rgba(0,0,0,0.03);
                              }
                           </style>
                        </head>
                     <body>
                        <div class="container">
                           <div class="row">
                              <div class="col-md-12">
                                 <div class="gxcpl-card-container gxcpl-shadow">
                                    <div class="gxcpl-card-header">
                                       New Registration
                                    </div>
                                    <cms:show_globals>
                                    <div class="gxcpl-card-body">
                                       <div class="row">
                                          <div class="col-md-2">
                                             <img src="<cms:show form_logo />" class="gxcpl-yatra-image">
                                          </div>
                                          <div class="col-md-10 text-center">
                                             <h1 class="gxcpl-no-margin"><cms:show form_name /></h1>
                                             <cms:if founder_name >
                                             <h3 class="gxcpl-no-margin">Founder Acharya <cms:show founder_name /></h3>
                                             </cms:if>
                                             <div class="gxcpl-ptop-10"></div>
                                             <h5 class="gxcpl-no-margin"><cms:show address /></h5>
                                          </div>
                                       </div>
                                    </div>
                                    </cms:show_globals>
                                    <div class="gxcpl-card-body-more">
                                       <div class="gxcpl-ptop-10"></div>
                                       <div class="row">
                                          <div class="col-md-12 text-center text-uppercase">
                                             Personal Details
                                          </div>
                                       </div>
                                       <div class="gxcpl-ptop-20"></div>

                                       <div class="row">
                                          <div class="col-md-2 gxcpl-label text-muted">
                                             First Name
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                          <div class="col-md-4 gxcpl-label">
                                             <cms:show frm_fname />
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                       
                                          <div class="col-md-2 gxcpl-label text-muted">
                                             Last Name
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                          <div class="col-md-4 gxcpl-label">
                                             <cms:show frm_lname />
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                       </div>

                                       <div class="row">
                                          <div class="col-md-2 gxcpl-label text-muted">
                                             DoB
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                          <div class="col-md-4 gxcpl-label">
                                             <cms:date frm_dob format="M d, Y" />
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                          
                                          <div class="col-md-2 gxcpl-label text-muted">
                                             Gender
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                          <div class="col-md-4 gxcpl-label">
                                             <cms:show frm_personal_gender />
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                       </div>
                                    </div>

                                    <div class="gxcpl-card-body-more">
                                       <div class="gxcpl-ptop-10"></div>
                                       <div class="row">
                                          <div class="col-md-12 text-center text-uppercase">
                                             Communication Details
                                          </div>
                                       </div>
                                       <div class="gxcpl-ptop-20"></div>

                                       <div class="row">
                                          <div class="col-md-2 gxcpl-label text-muted">
                                             Mobile
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                          <div class="col-md-4 gxcpl-label">
                                             <cms:show frm_mobile />
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>

                                          <div class="col-md-2 gxcpl-label text-muted">
                                             Email Id
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                          <div class="col-md-4 gxcpl-label">
                                             <cms:show frm_email />
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>

                                          <div class="col-md-2 gxcpl-label text-muted">
                                             Address
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                          <div class="col-md-10 gxcpl-label">
                                             <cms:show frm_address_personal />
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>

                                       </div>
                                    </div>

                                    <div class="gxcpl-card-body-more">
                                       <div class="gxcpl-ptop-10"></div>

                                       <div class="row">
                                          <div class="col-md-12 text-center text-uppercase">
                                             Yatra Member Details and Room Preference
                                          </div>
                                       </div>
                                       <div class="gxcpl-ptop-20"></div>

                                       <div class="row">
                                          <div class="col-md-2 gxcpl-label text-muted">
                                             Choose Yatra
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                          <div class="col-md-10 gxcpl-label">
                                             <cms:related_pages 'frm_choose_yatra'>
                                                <cms:show yatra_name />
                                             </cms:related_pages>
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                       </div>

                                       <div class="row">
                                          <div class="col-md-12 gxcpl-label text-muted">
                                             Member Details
                                             <div class="gxcpl-ptop-10"></div>
                                          </div>
                                          <div class="col-md-12">
                                             <div class="row">
                                                <cms:show_repeatable 'yatra_traveller' >
                                                <div class="col-md-4">
                                                   <strong><cms:show yatra_traveller_name /></strong>
                                                   <br>
                                                   <cms:date yatra_traveller_dob format='M d, Y'/>
                                                   <br>
                                                   <cms:show yatra_traveller_gender />
                                                   <br>
                                                   <cms:show yatra_traveller_room />
                                                </div>
                                                </cms:show_repeatable>
                                             </div>
                                             <div style="padding=top: 50px;"></div>
                                          </div>
                                       </div>
                                       <div class="gxcpl-ptop-20"></div>

                                    </div>

                                    <div class="gxcpl-card-body-more">
                                       <div class="gxcpl-ptop-10"></div>

                                       <div class="row">
                                          <div class="col-md-12 text-center text-uppercase">
                                             Terms &amp; Conditions
                                          </div>
                                       </div>
                                       <div class="gxcpl-ptop-20"></div>

                                       <div class="row">
                                          <div class="col-md-8 text-muted">
                                             Agree to Terms & Conditions?
                                          </div>
                                          <div class="col-md-4">
                                             <cms:show frm_tnc_read />
                                          </div>
                                       </div>
                                    </div>

                                    <div class="gxcpl-card-footer text-center"></div>
                                 </div>
                              </div>
                           </div>
                        </div>
                        <script type="text/javascript" src="assets/js/jquery-2.0.0.js"></script>
                        <script type="text/javascript" src="assets/js/bootstrap.js"></script>
                     </body>
                  </html>
                 </cms:send_mail>


Regards,
GenXCoders
Image
where innovation meets technology
Code: Select all
<cms:related_pages 'frm_choose_yatra'>

The code above will try to use a field literally named 'frm_choose_yatra'; I doubt if there is one by that name.

I suppose you were trying use the name contained in that variable instead. The correct syntax would be this (variables don't need quotes) -
Code: Select all
<cms:related_pages frm_choose_yatra>

Hope this helps.
@KK Sir,
Thanks for the reply.
Actually I have tried it both the ways as suggested by you. But it does not work either ways.

My relational field is defined as:
Code: Select all
<cms:editable name='choose_yatra' label='Yatra Applied For?' type='relation' has='one' masterpage='add-yatra.php' group='traveller' order='1' required='1' />


While my add-yatra.php has a field named "yatra_name" for the name to be saved. The same field also reflects the value into the k_page_title field.

I also tried using cms:pages by enclosing the codes above (mentioned by you) but no luck yet.

Regards,
GenXCoders
Image
where innovation meets technology
3 posts Page 1 of 1