Add Company Form

The Add Company form is used by employers to create a secondary user with the employer role. It also creates a company post which is used to display the employer's company profile.

However, unlike the main Employer registration form, a secondary role is created for the user called "Company". We use this Company role as a means to hide the APC post edit table on the My Company page for employers created with the main registration form. Those employers who have the Company role then only see the APC post edit table for employers created with the add company form.

The form includes a feed created with the GF User Registration Add-on and a feed created with the GF Advanced Post Creation Add-on.

The APC feed creates a company post (Meta Box) and includes settings for updating the post (fields, page where the form resides, etc.). The user can then edit the post from the Company page in their Dashboard.

The form uses conditional logic on user registration fields (username, password, email) so that those fields are hidden on the edit company page (won't save those fields otherwise). The logic looks for the original URL where the form was submitted and since the edit page is different it won't display the fields. This is all tied to a hidden field which captures the URL of the submit form and edit form pages.