• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: carousel form
PostPosted: Mon Oct 16, 2017 7:57 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jan 26, 2012 3:22 pm
Posts: 236
Location: Belgium
Hi,

I'm working on a website that needs to send a form to a carousel of receivers

I'll explain with an example:
I have a list of 12 people.
Every time the form gets submitted, it needs to be emailed to the next 5 persons of the list.
  • first submit: sent to contact 1 to 5
  • second submit sent to contact 6 to 10
  • third submit: sent to contacts 11,12 and 1 to 3

I was wondering if someone made this already or has an idea how we can create this.

_________________
Kind regards,
HarmO


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: carousel form
PostPosted: Mon Oct 16, 2017 9:59 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7955
Location: Fernie British Columbia, Canada
This certainly calls for some custom code. A UDT disposition in CGBetterForms would handle it.

You need:
a: the list of recipients
b: a static counter that gets incremented with each form submit. a site preference would work fine for this.

You also have to handle the occasion that there is a wraparound:
i.e: you have 27 emails in the recipient list and this is the 7th time the form was submitted. Not difficult, but requires a bit of logic.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: carousel form
PostPosted: Tue Oct 17, 2017 6:57 am 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3007
Location: The Netherlands
regarding b.: Perhaps this FormBuilder field can be used too:

Quote:
Unique Integer (Serial). This is an integer that increases every time someone hits your form. Your results may not be sequential, but they will increase monotonically.


Though 'not sequential' may not be desired in this case, and it seems the field is already filled on form display. While you may want to have the number 'generated' on submission. Especially on a site where multiple forms may be filled at the same time by different visitors.

Out of curiosity: what's the specific use case for this rotating recipients?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: carousel form
PostPosted: Wed Oct 18, 2017 7:08 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jan 26, 2012 3:22 pm
Posts: 236
Location: Belgium
@Calguy1000 and @Velden: Thank for the reaction.

I already thought it would require custom code :-). Where can i find documentation on using site preferences and how to modify them with code?

@Velden: the usecase is a website where visitors can request service quotes. The visitors query is then sold to up to 6 companies.

_________________
Kind regards,
HarmO


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
A2 Hosting