How do I add numbers to a list of records being displayed?

vbarlakoski 07 Oct, 2010
Hallo!

I have a simmular problem, maby exacly like this one.

When the registration form is loaded, i need to display registration number, the registrant to be able to see it, and same number to be sent with all other data to mail.

If its the same solution, in which file shoud i add this two lines script?

Thanks
GreyHead 07 Oct, 2010
Hi vbarlakoski,

I think that you have a completely different question to the one in the thread where you posted so I've moved this over here to the ChronoForms forums.

Joomla! assigns an integer id to each user who registers, is this enough to meet your needs? or do you need something else?

Bob
vbarlakoski 07 Oct, 2010
Hallo again!

I am using ChronoForms, and i have a form used for pre-register for events, which can fill up unregistered users. They fill up the all fields with data, and they are redirected to Thank You page. I need a different numbers (ordinal numbers - 1, 2, 3, 4...) for all different registrants, to receive on that "thank you" page, and me to receive same number with data sent to my e-mail address.

It`s just like: You open my site, fill up pre-registration form, get your reference number, come to that event you`ve registered for, give your number, and we find you in our lists by that number.

Is there a way?
GreyHead 08 Oct, 2010
Hi vbarlakoski ,

You can save each record in a database and use an autoincrementing primary key as an identifier. You can get that from ChronoForms if you set up a DB Connection to save the info.

Personally I prefer to use random strings as identifiers as they are more secure. If you have id=33 it's easy to guess that ids 34,35, 36, . . . are in use.

Bob
vbarlakoski 10 Oct, 2010
Ok, i`ve found the trick.

For cf_id print to each e-mail, and show into the redirect submit page i found this line in the forum posts.

<?php echo "Номер: ".$MyForm->tablerow["jos_chronoforms_Registracia"]->cf_id;?>


i`ve put this in the e-mail template, and also "On Submit code - after sending email:" and all is working like charm.

For founding this thread i used google search, because the forum advanced or mains earch does not include in search results - _ characters, but breaks my words. If i search e-mail it searchs for me e mail like separated keywords.

So, thanks a lot.

Bye for now🙂
GreyHead 10 Oct, 2010
Hi vbarlakoski,

That's it. I was just looking at your earlier post :-)

Bob

PS There's a customised Google search for the forums here if you take the ChronoSearch item from the Tutorials menu above. I created it to help me search the forums for exactly the same reason.
vbarlakoski 25 Mar, 2012
Hello again🙂

This type of code for the newer version od Chronoforms wont work. Can i ask for little help?

I want to send user_id in the emailed form.

The code is:

<?php echo "Id no:".$MyForm->tablerow["j25_chronoforms_data_publish"]->cf_user_id ;?>


Thanks!
GreyHead 26 Mar, 2012
Hi vbarlakoski ,

Please drag a Debugger action into the On Submit event. The output will show you exactly where the Joomla Registation action has saved the new User ID and you can use that in your email template.

Bob
vbarlakoski 26 Mar, 2012
Hello Bob! The debugger says:

 [chronoform_data] => Array
        (
            [cf_uid] => 50544036afab38eb177b6947b7c392ef
            [cf_created] => 2012-03-26 12:47:18
            [cf_ipaddress] => [hidden hehe]
            [cf_user_id] => 75
            [input_text_24] => TEST
            [input_text_27] => [hidden hehe]
            [input_select_9] => София
            [input_checkbox_group_2] => Авиация, Летища и Авиолинии
            [input_text_3] => 9617617
            [input_text_4] => TEST
            [input_textarea_5] => xcvbxb
            [input_checkbox_group_6] => Пълен Работен Ден
            [input_checkbox_group_7] => Временна/Сезонна/По проект
            [input_checkbox_group_8] => Студенти
            [input_text_10] => 
            [input_file_26] => 
            [input_text_21] => 
            [recaptcha_challenge_field] => 03AHJ_Vuv8NDSxTecLpWxzzd5zvsP2dQBvpBhkbbTtEmRM4Tdge0V4qSs-U4G7JhGN04g7SvZ7NaeHU8h8z_zbb_y2CQ-62KTgPC1OROV_s-3ZU3bsfDXUssHgf_fy9p-2-73uOLzhRVmQYFlc-i9z8GoogGVHLkBadQ
            [recaptcha_response_field] => reichert, priansi
            [input_submit_23] => Submit
            [234e4e8ea2a83175da5ce54bdbce7d6d] => 1
            [view] => form
            [chronoform] => publish
            [event] => submit
            [Itemid] => 218
            [option] => com_chronoforms
            [_PLUGINS_] => Array
                (
                    [upload_files] => Array
                        (
                        )

                )

            [cf_id] => 92
        )

    [chronoform_data_cf_id] => 92
)


Still dont know what to do.
GreyHead 21 Apr, 2012
Hi vbarlowksi,

The new user ID is 92 and it is in $form->data['chronoform_data']['cf_id']

Bob
This topic is locked and no more replies can be posted.