Thank you for coming back so quickly!
That has done the trick. I see I had a couple of errors in the code.
Is it possible to show fieldname2 and fieldname3 in the cart as currently it displays the total quantity required, which gives no description to the customer.