Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Show the number of entries in a Bizform as the display text on submission View modes: 
User avatar
Member
Member
ckelly-safefood - 10/21/2013 8:58:07 AM
   
Show the number of entries in a Bizform as the display text on submission
Hi,

I dont know if this is going to be very hard or not, but anyway...

Is it possible to show the number of entries when a user submit's a BizForm ?

Eg "Thanks for your entry. 55 people have also entered"

(Im using Kentico v7.0.43)

Thanks,
Gagser

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 10/21/2013 12:10:03 PM
   
RE:Show the number of entries in a Bizform as the display text on submission
What I'd recommend is to create a seperate page to send them to like a Thank You for your submission page and add a repeater with a custom query web part. In there create a new Query by clicking the New button next to the Query name property. Save the query in the Root document type. Set your query text to be
SELECT COUNT(*) AS TotalSubmissions FROM BizTableName
You'll have to create a transformation as well that can have the simple text
<p>Thank you for your submission.  <%# EvalText("TotalSubmissions") %> have also entered.</p>
Hope this helps.

User avatar
Kentico Support
Kentico Support
kentico_romank - 10/22/2013 4:44:51 AM
   
RE:Show the number of entries in a Bizform as the display text on submission
Hi,

The solution which FroggEye recomends is straightforward and easy to accomplish, if you dont mind to redirect users after submitting the form to different page I would also recommend this approach.

Different approach could be modifying the bizform.ascx.cs file. You can use the following code to achieve the number of records from the selected from:
CMS.FormEngine.BizFormInfo bi = CMS.FormEngine.BizFormInfoProvider.GetBizFormInfo(bizFormID);

Label2.Text = bi.FormItems.ToString();

Best Regards,
Roman Konicek

User avatar
Member
Member
ckelly-safefood - 10/22/2013 4:53:09 AM
   
RE:Show the number of entries in a Bizform as the display text on submission
Thanks lads,

That's a good start.

Colman