+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    i47
    i47 is offline
    Junior Member
    Join Date
    Jun 2010
    Posts
    5

    Default contact form issues

    hi there,

    is it possible to get any hint, where to find code to define additional fields in the contact form correctly and to define if they are required or not?

    i found contact.htm with for example
    <div class="form-section">
    <input type="text" size="22" class="requiredField textfield" value="" id="contactName" name="name"/>
    <label for="contactName" class="textfield_label">Name *</label>
    </div>

    but the additional fields, if i use the syntax above, will not be send bei the sending script and i need to set some of them to "not required"...
    how can I?

    thx
    tom

  2. #2
    OXYLUS Development Emanuel's Avatar
    Join Date
    Feb 2008
    Location
    Romania
    Posts
    329

    Default

    Add thenew fields in contact.htm

    then go in admin/modules/oxymall/plugins/site.contact.php

    ( this works only for non required fields )

    go to line 178 and add the new vars

    $vars["new_var"] = stripslashes($_POST["new_var"]);
    $vars["new_var2"] = stripslashes($_POST["new_var2"]);

    Then go in admin->contact->module settings->email notifications and add this new variables in the message body {NEW_VAR} and {NEW_VAR2}

    Optional

    To have them saved in the database you need to add the new variables as fields to site_oxymall_plugins_contact_messages ( add 2 varchar fields new_var and new_var2 )

    Then edit the following lines

    Code:
    		$id = $this->db->QueryInsert(
    			$this->tables["plugin:contact_messages"],
    			$contact = array(
    				"module_id"		=> $this->tpl_module["mod_id"],
    				"item_new"		=> 1,
    				"item_date"		=> time(),
    				"item_email"	=> $vars["email"],
    				"item_name"		=> $vars["name"],
    				"item_subject"	=> $vars["subject"],
    				"item_message"	=> $vars["message"],
    				"item_department"	=> $vars["regarding"],
    
    				"new_var"		=> $vars["new_var"],
    				"new_vars2"		=> $vars["new_var2"]
                   
    			)
    
    		);

    Then go in admin/modules/oxymall/plugins/forms/contact/items/

    open add.xml

    after <item_message type="text" title="Message"/>

    add your new variables

    <new_var type="text" title="New Var"/>
    <new_var2 type="text" title="New Var2"/>

    I hope i covered everything.
    - Search before posting, most of the problems has been discussed already.
    - Make sure you have all the fixes and updates installed before reporting anything
    - Allow us up to 48 hours to respond
    - After having your support request resolved please rate the thread.
    - Be polite, keep in mind we are offering the support for free as curtoasy for you.


    http://www.oxylusflash.com
    http://www.oxylustemplates.com
    http://www.flashtory.com

  3. #3
    i47
    i47 is offline
    Junior Member
    Join Date
    Jun 2010
    Posts
    5

    Default

    hi,

    perfect! after view tries all works fine now.

    thx for the lines,
    regards,
    tom

Similar Threads

  1. Contact Form Not Working
    By bubbagump64 in forum inFocus - Powerfull Professional Template with CMS and E-Shop
    Replies: 8
    Last Post: 04-05-2011, 06:20 PM
  2. Add departments to Contact Us Form
    By eglwolf in forum Vision - Corporate and Portfolio Template with CMS and E-Shop
    Replies: 4
    Last Post: 01-16-2011, 05:16 PM
  3. Contact Form Redirecting to Homepage?
    By dehnger2u in forum Robust Business and Portfolio Template with CMS and SHOP
    Replies: 8
    Last Post: 01-16-2011, 04:14 PM
  4. Special Characters in Mails / Contact Form (Umlaute)
    By JoeBlack1978 in forum Robust Business and Portfolio Template with CMS and SHOP
    Replies: 0
    Last Post: 01-04-2011, 11:22 PM
  5. Compatibility Issues
    By designer-girl in forum inFocus - Powerfull Professional Template with CMS and E-Shop
    Replies: 1
    Last Post: 11-04-2010, 03:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts