Is there are prop to limit the file type for FormInput?

This is the JSX code for the InputForm and I’m wondering if there is a prop to limit the accepted files that cand be uploaded. In this cases I’m looking to limit to PDF and Wod docs for resume submissions. Or is there some other way of doing this using the Builder.io input form component?

import { FormInput } from “@components”;

export default function MyComponent(props) {
return (
<FormInput
$name=“Input”
name=“Resume”
placeholder=“Upload Resume PDF”
type=“file”
class=“p-3 mt-2.5 rounded-t-md rounded-br-md rounded-bl-md border-t border-r border-b border-l bg-white bg-opacity-10”
required={true}
/>
);
}

Hi foggy​,

Yes, you can limit the accepted file types in a <FormInput> for file uploads by using the accept attribute, which is standard in HTML for <input type="file" />.

To allow only PDF and Word documents, update your component like this:

import { FormInput } from “@components”;

export default function MyComponent(props) {
  return (
    <FormInput
      $name="Input"
      name="Resume"
      placeholder="Upload Resume PDF"
      type="file"
      accept=".pdf,.doc,.docx"
      className="p-3 mt-2.5 rounded-t-md rounded-br-md rounded-bl-md border-t border-r border-b border-l bg-white bg-opacity-10"
      required={true}
    />
  );
}

Thank you,