Square suffix?

More
7 years 1 month ago - 7 years 1 month ago #66452 by lipatovroman
Square suffix? was created by lipatovroman
Hi!
For example we have Real Estate site.

1. Apartments type.
2. Land property type.

Both types have Square field.

But in Apartments Square in square meters.
In Land property - hectares.

So, what should I do?

Create 2 different fields and assign them to different types or create one field, but how to use different units for different types?

Or may be I should create create 1 text field for numbers and 2 dropdown field with meters|hectares ?
But in that case they would not be linked to each other...

Thanks.
Last edit: 7 years 1 month ago by lipatovroman.

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #66457 by ggppdk
Replied by ggppdk on topic Square suffix?
Hello

you can add different suffix via parameters value "prefix" / suffix / separator
or you can use a custom layout

but the above can not be done per type
and checking the type inside all layouts may not be convenient

i think you better create 2 fields


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #66468 by lipatovroman
Replied by lipatovroman on topic Square suffix?

ggppdk wrote: you can add different suffix via parameters value "prefix" / suffix / separator


You mean add different suffix values?



Does not work for me...

It should displays dropdown values in edit form?

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #66498 by micker
Replied by micker on topic Square suffix?
you can't
the best we be to code this in templat
1 check value
2 create and if condition
3 display suffix in regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago - 7 years 1 month ago #66562 by ggppdk
Replied by ggppdk on topic Square suffix?
Hello

Does not work for me...
It should displays dropdown values in edit form?


Exactly as i explained above, you cannot do it via parameters,
- as you said the suffix should also be displayed as dropdown
inside item form to be able to do what you need

SOLUTIONS:
- either 2 fields
- or a custom layout with customize PHP code

Inside a custom layout for the text field (select the new layout inside field configuration)
-- Check the value of:
$item->type_id
and according to the type you can add a different suffix


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 7 years 1 month ago by ggppdk.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.303 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline