$form ['tickets' . $ticket->id] ['price-' . $ticket->id] = array (
'#type' => 'textfield',
'#title' => t ( 'Price' ),
'#size' => 60,
'#maxlength' => 128,
'#title_display' => 'invisible',
'#attributes' => array ('placeholder' => 'Price'),
'#field_prefix' => '$',
'#default_value'=>sprintf("%.2f",$ticketPrice), //two number
);
'#type' => 'textfield',
'#title' => t ( 'Price' ),
'#size' => 60,
'#maxlength' => 128,
'#title_display' => 'invisible',
'#attributes' => array ('placeholder' => 'Price'),
'#field_prefix' => '$',
'#default_value'=>sprintf("%.2f",$ticketPrice), //two number
);
No comments:
Post a Comment