used if else and foreach statements with : as per a standard in templates
used a function in a block to get the url for the form