This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Display additional information in the success page


  1. gothmane
    Member

    Hi,

    Here is my situation. I'm using machform to enable to users to submit a registration form. My question is how do I display a confirmation number (like an order number) along with the success message. Also is there a way to start the numbering from, say 6000 instead of starting from 1?

    I hope I'm not confusing. Any help will be greatly apprecaited

    Posted 16 years ago #
  2. redityo

    Hi ...

    It's possible to show confirmation number with adding a session on your confirmation number element. Try to follow this post

    http://www.appnitro.com/forums/topic/displaying-entry-number-in-success-message?replies=4

    For numbering, can you tell me how you do it for now ? for this case maybe you can consider to use auto number logic but you have to make some modification to your machform files.


    MachForm Support

    Posted 16 years ago #
  3. gothmane
    Member

    Thank you very much.. I'll try to implement this and let you know if I face any problem. :)

    Posted 16 years ago #
  4. redityo

    feel free to contact us :)


    MachForm Support

    Posted 16 years ago #
  5. gothmane
    Member

    Yes I was able to display the entry number on the success page. Now the numbering is very simple (1, 2, 3, etc.) Instead what I would like to do is start the numbering from 10,000. How do I do that?

    Posted 16 years ago #
  6. redityo

    If you want to show inserted data ID from 1000. You can add the session variable with 1000 in post-functions.php file on line 1030.

    //retrieve the id from last inserted data
    if ($form_id == '1') {
       $_SESSION['form_element_data'] = $record_insert_id+1000;
    }

    MachForm Support

    Posted 16 years ago #
  7. cyberjorge
    Member

    In this example, how do I make it instead of "1000" make 1 appear as "001"?

    Also what is the line of code where I'm going to put "//retrieve the id from last inserted data" after? I get errors when I update my code, I think my line numbers are not accurate with your reference.

    Thanks!

    Posted 15 years ago #
  8. cyberjorge
    Member

    @redityo

    Any suggestion?

    Posted 15 years ago #
  9. redityo

    Sorry for the delay, you can put the code after this line :

    $record_insert_id = mysql_insert_id();

    Simply search for that code in post-function.php and I think you'll found it around line 1013 ~ 1020.

    Anyway to change the entry id to '001' format, you can change the code to be like this :

    //retrieve the id from last inserted data
    if ($form_id == '1') {
       $_SESSION['form_element_data'] = str_pad($record_insert_id,4,'0',STR_PAD_LEFT);
    }

    MachForm Support

    Posted 15 years ago #

RSS feed for this topic

Reply