Skip to content

Commit

Permalink
Added clarifications about dropdown field
Browse files Browse the repository at this point in the history
  • Loading branch information
tingerrr committed Jan 1, 2024
1 parent 3084f55 commit c996cfd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/forms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,17 @@ fn main() -> std::io::Result<()> {
}
}

// Let's add a dropdown menu and allow the user to chose a custom option
// too.
// Let's add a dropdown menu and allow the user to chose from preconfigrued
// options while allowing them to add their own custom option too.
let dropdown_id = Ref::new(11);
let mut field = pdf.form_field(dropdown_id);

// Choice fields come in two types, list and combo boxes. A combo box is
// also known as a dropdown menu, a list box is like a permanently expanded
// drop down menu. The edit flag allows the user to insert their own custom
// option.
// NOTE: at the time of writing this pdf.js (firefox) does not allow
// editing of the box
field
.partial_name(TextStr("choice"))
.field_type(FieldType::Choice)
Expand Down

0 comments on commit c996cfd

Please sign in to comment.