[solved]How to create custom property type for FEU?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
ivanshum
Forum Members
Forum Members
Posts: 16
Joined: Sun Jul 03, 2011 10:01 am

[solved]How to create custom property type for FEU?

Post by ivanshum »

Hi, All. I need a property that can be only editable from admin side and stored in database. I can't use hidden field type becose user can change the value by editing page code. But i need save hidden type becose standart functionality needed too.
Last edited by ivanshum on Fri Jul 05, 2013 11:27 am, edited 2 times in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How to create custom property type for FEU?

Post by Dr.CSS »

Is there a check box for private on fields..?
ivanshum
Forum Members
Forum Members
Posts: 16
Joined: Sun Jul 03, 2011 10:01 am

Re: How to create custom property type for FEU?

Post by ivanshum »

No, I need to store an unlimited number of phone numbers. From the user, it looks like some fields under each number. But they should be stored in a single text field using a separator. Because I need to validate each phone number and a storage format is required for compatibility with other module that I can not change.

I know many ways to solve this problem. But I would like to learn the structure of the module "FrontEndUsers" and customize it to suit yourself.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: How to create custom property type for FEU?

Post by Jo Morg »

ivanshum wrote:I need a property that can be only editable from admin side and stored in database. I can't use hidden field type becose user can change the value by editing page code. But i need save hidden type becose standart functionality needed too.
ivanshum wrote:But they should be stored in a single text field using a separator
You can have a thousand custom properties and show only one in your templates. The module sends the properties to Smarty, but it is up to you to determine if and how they are used on the templates.
You should check the default sample templates to see how to get the properties outside the foreach loop... because what you'll want to do is to avoid the loop altogether and call the fields/properties by name.
If the user sees the fields or not depends more on the templates than on the way you set the custom properties.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
ivanshum
Forum Members
Forum Members
Posts: 16
Joined: Sun Jul 03, 2011 10:01 am

Re: How to create custom property type for FEU?

Post by ivanshum »

Why i don't think about this way? :) Thanks.
Post Reply

Return to “Modules/Add-Ons”