# Employee Onboarding Template

Complete employee onboarding form workflow.

## Files

- **employee_onboarding_form.toml** - Main onboarding form
- **onboarding_template.toml** - Alternative onboarding template

## Sections

1. **Personal Information**
   - Full name
   - Email address
   - Phone number
   - Date of birth (optional)

2. **Employment Details**
   - Job title
   - Department
   - Start date
   - Reports to

3. **Address Information**
   - Street address
   - City, state, zip
   - Country

4. **Emergency Contact**
   - Contact name
   - Relationship
   - Phone number

5. **Policy Agreements**
   - Employee handbook acknowledgment
   - Confidentiality agreement
   - Code of conduct
   - Data privacy consent

6. **Benefits Selection**
   - Health insurance tier
   - 401k enrollment
   - Direct deposit setup

## Running the Form

### CLI
```bash
cargo run --example employee_onboarding_form
```text

### TUI
```bash
cargo run -p typedialog-tui -- \
  --config examples/09-templates/employee_onboarding/employee_onboarding_form.toml
```text

### Web
```bash
cargo run -p typedialog-web -- \
  --config examples/09-templates/employee_onboarding/employee_onboarding_form.toml
```text

## Expected Output

The form produces JSON:
```json
{
  "first_name": "John",
  "last_name": "Doe",
  "email": "john@company.com",
  "phone": "+1-555-0123",
  "job_title": "Software Engineer",
  "department": "Engineering",
  "start_date": "2024-01-15",
  "handbook_agreed": true,
  "benefits_tier": "Gold"
}
```text

## Customization

### Add Fields
Edit the TOML to add:
- Health screening questions
- IT equipment assignments
- Training preferences
- Background check authorization

### Add Validation
```toml
[fields.email]
type = "email"
label = "Work Email"
pattern = "@company\\.com$"  # Must be company email
```text

### Conditional Sections
Show benefits section only if:
```toml
[sections.benefits]
visible_when = { employment_type = "Full-Time" }
```text

## Integration

After form submission:
1. Store data in employee management system
2. Trigger background check process
3. Create email account
4. Assign IT equipment
5. Send welcome package
