So I want to add a file upload to a page. I want the user to only upload pdf's. I've looked through the tutorials and the documentation and I've managed to add a filefield but I don't have a clue how to limit it to PDF. I found the $allowed_file_types property but don't know how to apply it. Can someone help me?
$fields->addFieldToTab("Root.Content.Files", new FileField('Pdf'))
Thanks