How to create SharePoint Survey with expiration date? -


i have custom survey have expiration date in rootweb.properties. how redirect users want responde survey after expiration date (click "respond survey" or use direct link newform.aspx) custom page custom text (b.e. "this survey has expired")?

you can write event receiver achieve this. on event receiver code can check expiration date , if expired, can cancel item adding , redirect user custom page. note custom url must relative url.

public override void itemadding(spitemeventproperties properties)    {        base.itemadding(properties);        if (datetime.now > "your expiration date")        {            properties.status = speventreceiverstatus.cancelwithredirecturl;            properties.redirecturl = "your custom url";        }    } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -