currency
field to contain an amount in a specific currency.
Create the currency
field type using
You appear to be a bot. Output may be restricted
bw_register_field( "_pp_price", "currency", "Price", array( '#validate' => 'is_numeric' ) ); bw_register_field_for_object_type( "_pp_price", "premium_plugins" );
Form display
When displayed in the Fields meta box or [bw_new] it appears like this.bw_fields display
When displayed by [bw_fields] it appears like this.Notes
This is a simple field that doesn’t store the currency type, just the value. If you need to record the currency type use a select field.Related
- bw_form_field() – Display a field in a form for the user to enter/choose a value
- bw_theme_field_currency() – Theme a field of type ‘currency’