Page 1 of 1

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

Posted: Mon Jul 01, 2013 10:47 am
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.

Re: How to create custom property type for FEU?

Posted: Mon Jul 01, 2013 4:02 pm
by Dr.CSS
Is there a check box for private on fields..?

Re: How to create custom property type for FEU?

Posted: Tue Jul 02, 2013 12:18 pm
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.

Re: How to create custom property type for FEU?

Posted: Tue Jul 02, 2013 12:32 pm
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.

Re: How to create custom property type for FEU?

Posted: Tue Jul 02, 2013 12:52 pm
by ivanshum
Why i don't think about this way? :) Thanks.