Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Blank Option to Form Dropdown Entry List Corrupts Output File #583

Open
ComputerTinker opened this issue Jul 29, 2015 · 0 comments
Open

Comments

@ComputerTinker
Copy link
Contributor

ComputerTinker commented Jul 29, 2015

If you change line #17 inside of Sample_33_FormField.php to read:

$textrun->addFormField('dropdown')->setEntries(array('', 'Choice 1', 'Choice 2', 'Choice 3'));

... and then parse the file using PHPWord, Word will complain that the resultant file is corrupted.

image

It would be nice to be able to have a blank option as the default, so that I can present the user with a list of dropdown choices, but not give him/her the impression that something has been pre-selected. My workaround right now is to create an option entry with a value of " ----- " as the first entry in the option list, so that it's apparent that the user still needs to make a selection.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant