Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

UserForms - extending it a bit


Go to End


4 Posts   1201 Views

Avatar
borriej

Community Member, 267 Posts

2 March 2011 at 2:40am

I got a few questions about the UserForms module.

-> How do I (automatically) transfer all form request in a table, which I can manage through ModelAdmin in the CMS?
-> I want adres recognition by zipcode, based on a database which contains all streets & places. How do i enter these dynamic fields into the Form?
-> Each form entry must generate a unique number which will get stored in the db table, how do i do that?

Hope to hear from you guys.
Thanks!

Avatar
Willr

Forum Moderator, 5523 Posts

2 March 2011 at 10:40pm

1) You could setup a modeladmin interface around the 'SubmittedForm' dataobject. The SubmittedForm object has each field

2) Each form already gets a unique ID (for the primary key) as like every SS dataobject so you could use that.

Avatar
borriej

Community Member, 267 Posts

3 March 2011 at 11:47pm

thx willr :) i will check this out in a few days, you will hear from me!

Avatar
borriej

Community Member, 267 Posts

14 March 2011 at 12:30am

Hello (Willr)

Im back to extending the UserForm!
I want two emails to be send, one to the admin.. thats easy, just fill in email receipient.

The other one should go to the customer but the text in the email is dynamic, so that makes it more difficult.

A script needs to be executed after 'send'. This script determines the nearest shops.. it will result in 2 addresses that will be send to the customer by email. I already have this script, but how do i run/include this script in the email that should be send.

The idea is that a discount coupon gets send to the email of the customer, with the nearest address on it.

Thx for your help!