We need you!

Icon

The IzPack documentation needs work, and you are invited to edit it!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Adding information on description tag

...

If you wish to have a file field that can be used optionally, use the attribute allowEmptyValue="true" inside of the nested spec element:

Code Block
languagehtml/xml
<field type="file" variable="the.file">
  <spec txt="" size="25" allowEmptyValue="true" set=""/>
</field>

 

This supports a <description> element that can be used to provide information about the purpose of the file field.
See Fields documentation for more detail.

Code Block
languagehtml/xml
<field type="file" variable="password.file">
  <description id="password.file.info" txt="Where would you like to place your password file?/>
  <spec size="25"/>
</field>

 

 

Note: Mixing file fields with other fields that have text in front of them can lead to formatting (layout) issues. Placing these types of elements on different panels can provide a much better user experience.