Appnitro Software Forums » MachForm

Character value with limit & feedbgack without database

(2 posts)

  1. maxyeo
    Member

    Dear sir, I'm one of the purchaser of your software and i have few problem when after i using your software because i need to create one feedback form without using "Database" just like direct sent to email. Because i have no hosting server that why i using localhost to create my company feedback form but the other problem is when i create the text field for member to enter they membership code in only 7 digit but for your software i can't find it any function to modified it.Let say if i copy all the recuired source file to my folder, is it still send the data to my database? I mean i want the feedback form without database. Can you give me some help? If not i will face the big problem with my employee.Please.

    Posted 3 months ago #
  2. Hi ..

    You can try to modify your post-functions.php in line 1002 ~ 1008 for ignore database saving process, I assume your feedback form id = 1 :

    if(empty($form_review)){
       if ($form_id <> '1') //<-- set with your form id
          $query = "INSERT INTO ap_form_{$form_id}($field_list) VALUES
         ($field_values);";
    }else{
    //insert to temporary table, if form review is enabled
       if ($form_id <> '1') //<-- set with your form id
       $query = "INSERT INTO  ap_form_{$form_id}_review($field_list)
         VALUES($field_values);";
    }

    and for your second question, you can limit text field with editing view-functions.php. In here I assume you use the text field id = 1 on form 1

    1. add this code in line 39

    $limit_text = '';
    
    //don't forget to adjust with your form and element id
    if ($_GET['id'] == '1' and $element->id == '1') {
    	$limit_text = 'maxlength="7"';
    }

    2. edit line 50

    from

    <input id="element_{$element->id}" name="element_{$element->id}"
    class="element text {$element->size}" type="text"
    value="{$element->default_value}" />

    to

    <input id="element_{$element->id}" name="element_{$element->id}"
    class="element text {$element->size}"
    type="text" value="{$element->default_value}" {$limit_text} />
    Posted 3 months ago #

RSS feed for this topic

Reply

You must log in to post.