Combine money and print type in Add/Edit/Details Mode

Talk about implementing of customized templates

Moderator: alexandrleonenko

hermanfransen
Junior
Junior
Posts: 11
Joined: Jan 19th, '09, 13:47
Location: Amsterdam - The Netherlands

Combine money and print type in Add/Edit/Details Mode

Postby hermanfransen » May 6th, '13, 14:19

Is it possible to use the money type without the option for the user to edit the field in Edit Mode. So combination of print and money type. I want to use the Edit Mode since I have fields to edit and fields only for display use in one screen.

So simple said, I want to display € 1.230,45 field from database type decimal (4,2).

Thanks

administrator
Site Admin
Site Admin
Posts: 6011
Joined: Jan 7th, '09, 23:18
Contact:

Re: Combine money and print type in Add/Edit/Details Mode

Postby administrator » May 7th, '13, 06:44

Why not? You may define this field as 'readonly' in edit mode, and show it as 'type'=>'money' in view mode.

hermanfransen
Junior
Junior
Posts: 11
Joined: Jan 19th, '09, 13:47
Location: Amsterdam - The Netherlands

Re: Combine money and print type in Add/Edit/Details Mode

Postby hermanfransen » May 8th, '13, 15:53

If I do so, then it will show a edit box and the user will think the value can be changed.

Is there an better solution for this?

administrator
Site Admin
Site Admin
Posts: 6011
Joined: Jan 7th, '09, 23:18
Contact:

Re: Combine money and print type in Add/Edit/Details Mode

Postby administrator » May 9th, '13, 06:17

You may use 'label' field or textbox with 'readonly' attribute - according to your preferences:


Code: Select all

'FieldName_3'  =>array('header'=>'Name_C', 'type'=>'label',      'title'=>'', 'default'=>'', 'visible'=>'true', 'on_js_event'=>''),

hermanfransen
Junior
Junior
Posts: 11
Joined: Jan 19th, '09, 13:47
Location: Amsterdam - The Netherlands

Re: Combine money and print type in Add/Edit/Details Mode

Postby hermanfransen » May 10th, '13, 08:56

But then I loose the option to show € 12,50 in stead of 12.5

Is there a way to do so?

administrator
Site Admin
Site Admin
Posts: 6011
Joined: Jan 7th, '09, 23:18
Contact:

Re: Combine money and print type in Add/Edit/Details Mode

Postby administrator » May 12th, '13, 07:22

So make it 'readonly" ans use CSS to make this field looks as a "label" (remove border, change background color etc.)


Return to “Add/Edit/View Mode Templates Implementing”