Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
Hi Guys, here I am with my stupid requests like usually...thanks in advance for your time.

I have a contact form and I would like the client to control the dropdown fields of the contact form from the related page in the CMS and the email the form will be sent to.

Please tell me that this is possible :P

Thanks Guys
Manu
Hi Emanuele,

Could you please post in the requirement in greater detail?
A sample form (or an image of it) with details of how it should finally work would be great.

Thanks
Hi There,

this is the code:

Code: Select all
<cms:form method="post">
    <cms:if k_success >
        <h3>Thanks for your application</h3>
        <cms:send_mail from='creativity@iscd.edu.au' to='<cms:show email_to />' subject='<cms:show email_sub />'>
            <cms:show k_success />
        </cms:send_mail>
    </cms:if>
   
    <cms:if k_error >
        <h3>Failed to submit form</h3>
        <cms:each k_error >
            <cms:show item /><br>
        </cms:each>
    </cms:if>
   <table width="100%" border="0" cellspacing="0" cellpadding="0" id="form">
  <tr>
    <td>First Name<br /><br /><cms:input type="text" size="10" maxlength="40" name="f_name" required='1' class='form_field rounded-corners'/><br /><br /></td>
    <td>Surname<br /><br /><cms:input type="text" size="10" maxlength="40" name="s_name" class='form_field rounded-corners'/><br /><br /></td>
  </tr>
  <tr>
    <td>Address<br /><br /><cms:input type="text" size="10" maxlength="40" name="address" class='form_field rounded-corners'/><br /><br /></td>
    <td>Town<br /><br /><cms:input type="text" size="10" maxlength="40" name="town" class='form_field rounded-corners'/><br /><br /></td>
  </tr>
  <tr>
    <td>State<br /><br /><cms:input type="text" size="10" maxlength="40" name="state" class='form_field rounded-corners'/><br /><br /></td>
    <td>Contact<br /><br /><cms:input type="text" size="10" maxlength="40" name="phone" class='form_field rounded-corners'/><br /><br /></td>
  </tr>
    <tr>
    <td>Email<br /><br /><cms:input type="text" size="10" maxlength="40" name="email" class='form_field rounded-corners'/><br /><br /></td>
    <td>Alternate Ccntact Number<br /><br /><cms:input type="text" size="10" maxlength="40" name="alt_phone" class='form_field rounded-corners'/><br /><br /></td>
  </tr>
      <tr>
    <td>I would like informations about<br /><br /><cms:input type="dropdown" name="info_i_like" opt_values="Professional Courses | Short Courses | Workshops | General Enquiry" class='form_field_drop'/><br /><br /></td>
    <td>Would you like to receive information<br />about future courses and events?<br /><cms:input type="checkbox" name="receive_info" opt_values="Yes | No" /><br /><br /></td>
  </tr>
  </table>
<cms:input name="submit" type="submit" value="Send" /> <br /><br />

   
   </cms:form>


Basically i need the opt_values of info_i_like to be editable trough the CMS. :)

Thanks for your time :)
Hi Emanuele,

The highlighted portion of the code below is that you need to be editable -
<td>
I would like informations about<br /><br />

<cms:input type="dropdown"
name="info_i_like"
opt_values="Professional Courses | Short Courses | Workshops | General Enquiry"
class='form_field_drop' />

<br /><br />
</td>

You can easily create an editable region of type 'text' for your client and ask him to input the desired values separated by '|' e.g.
Summer Courses | Certificate Courses | Get a quote

This editable region can either be defined in the template this form is being used on or you could use a global template.
So suppose the name of the editable region is 'info_i_like', the code above can now be modified as follows and the drop down will show values inputted by your client.
<td>
I would like informations about<br /><br />

<cms:input type="dropdown"
name="info_i_like"
opt_values="<cms:show info_i_like />"
class='form_field_drop' />

<br /><br />
</td>

Hope this helps.
cool I thought I wouldn't have worked...thanks KK!!! :)
6 posts Page 1 of 1