Appnitro Software Forums » MachForm

How to make forms in Form Manager to be shown in ascending order

(5 posts)

  1. I'm pretty new in this forum as well as in using of MachForm. So naturally I'll ask a lot of questions.
    But first, I would like to say that MachForm is very nice application. I like it.
    Kudos to Appnitro!

    Now back to the business:
    The question is - How to make forms in Form Manager to be shown in ascending order?
    Currently the order is descending. The last created form created below. I would like to change this order i.e. to see the last created form above.
    That should be some minor change in code.

    Posted 10 months ago #
  2. Hi,

    Yes .. you can do small changes in "manage_form.php", edit the file and go to line 26 and 105, you'll see these SQL:

    $query  = "select form_id from <code>ap_forms</code> order by form_id asc";

    and

    $query = "select form_id,form_name,form_active,form_email from <code>ap_forms</code> order by form_id asc $limit";

    in there you can see the order is ascending, simply change the order to descending to be like this

    $query  = "select form_id from <code>ap_forms</code> order by form_id desc"; 
    
    $query = "select form_id,form_name,form_active,form_email from <code>ap_forms</code> order by form_id desc $limit";
    Posted 10 months ago #
  3. Thank you redityo!
    Do you have idea how to change also a sequence number in left side of this line to ascending order?

    Posted 10 months ago #
  4. You need some modification in "manage_form.php" again then, try to follow these steps :

    1. Go to line 435 and you'll see this code

    $i=($pageno -1) * $rows_per_page + 1;

    put this code exactly bellow that line

    $form_no = $numrows - (($pageno -1 ) * $rows_per_page)  ;

    2. Go to line 460 and you'll see this code :

    <h3><?php echo "$i.&nbsp; {$data['form_name']}" ?></h3>

    change it to

    <h3><?php echo "$form_no.&nbsp; {$data['form_name']}" ?></h3>

    3. Go to line 508, you'll see this

    $i++;

    put this code bellow that line

    $form_no--;
    Posted 10 months ago #
  5. Marvelous! :-)
    Thank you!

    Posted 10 months ago #

RSS feed for this topic

Reply

You must log in to post.