More than just websites
we give you strategies for your Online Business
No one logged in. Log in

Automatically set expiry date on Secure Zone in Business Catalyst

04-Feb-2011 I have been struggling with this for days and the forums on Business Catalyst are piecemeal so I thought I would put the solution here for my own reference and for anyone else that maybe stuggling.

Problem


I want to subscribe a user to a secure zone for only 12 months but instead of doing it manually I want to automatically set an expiry date when they fill in the signup form.

Solution

Insert this code into the form somewhere, it just needs to be between the form tags. Keep the value="1-Oct-2008" as this gets overwritten.

<input type="hidden" value="1-Oct-2008" name="ZoneExpiry" id="ExpiryDate"/>
 

This code needs to go at the bottom of the page.  The "+ 365" part can be set to however many days out you want the expiry to be.

<script type="text/javascript">
function setExpiryDate( )
{
var dat=new Date();
dat.setDate(dat.getDate() + 365);
var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug","Sep","Oct","Nov","Dec")
var pretty = dat.getDate() + "-" + monthname[dat.getMonth()] + "-" + dat.getFullYear();
document.getElementById("ExpiryDate").value = pretty;
};setExpiryDate( );

</script>

The code on these pages is not clear.

http://onlinebusinesswiki.com/index.php/Secure_zone#Setting_the_expiry_date_for_a_secure_zone_subscription_upon_the_web_form_submission

http://businesscatalyst.com/ForumRetrieve.aspx?TopicID=13977&A=SearchResult&SearchID=1928024&ObjectID=13977&ObjectType=43

http://businesscatalyst.com/ForumRetrieve.aspx?TopicID=13130&A=SearchResult&SearchID=1928024&ObjectID=13130&ObjectType=43

Tips and Tricks

Mobile browsing overtakes Desktop

24-Jun-2011 It has finally happened for the first time ever, people in the US are spending more time using mobil..

IE6 must die

10-May-2011 When I was rebuilding this website, I started my cross browser testing and then I started debugging ..

Reasons for an e-Commerce website

10-May-2011 Online retailing has come of age, and its serious business. When web-based retailing has been growin..

SEO - do you need it

10-May-2011 Search Engine Optimisation (SEO) has many tactics but they can all be divided into either on page or..

Three Phases to Online Success

10-May-2011 So you may have an online shop or you have grand plans for one, or maybe a membership website where ..

How to maintain an Asset Register for all your online assets

28-Feb-2011 I see lots of business owners in a panic when unexpectedly they need to renew expired hosting, Secur..

Why it is important to keep domain name details up to date

28-Feb-2011 I recently had a client, (I will call them XYZPartnership*) who had registered their domain name 12 ..

Automatically set expiry date on Secure Zone in Business Catalyst

04-Feb-2011 I have been struggling with this for days and the forums on Business Catalyst are piecemeal so I tho..

My Gmail email signature is different on my phone and desktop computer

03-Feb-2011 I have been battling with this for a while now, and I just could not figure it out. I changed my ema..

73% of users have the same password for everything including Online Banking.

28-Jan-2011 This is a shocking statistic. No wonder people are afraid of getting hacked, they make it so easy. ..


Trish Gorring founder of Ingress OnlineTrish Sait is the founder of Ingress Online.  She has been building websites for more than 11 years' both here in Australia and the UK. During that time she has developed a wealth of knowledge about all things internet especially web standards, marketing, SEO and strategy. You can connect with her on Twitter @Ingressonline.