[correct fieldname] create a personal field problem with xml

More
10 years 6 months ago #40176 by tghpow
Hi all,

after an internship in a web agency who's work with Joomla , i'm trying to better understand how FLEXIcontent work.
So, to my personal site, i need to create a little field.
nothing huge, just a way to practice, with fun :roll:

So, my problem is with the file.xml.
I explain:

this is my code:
Code:
<?xml version="1.0" encoding="utf-8"?> <extension type="plugin" version="1.6" group="flexicontent_fields" method="upgrade"> <name>FLEXIcontent - avancement_project</name> <author>Thibault CHAZOTTES</author> <creationDate>september 2013</creationDate> <authorUrl>www.thibault-chazottes.fr</authorUrl> <version>1.0</version> <description>FLEXI_FIELD_AVANCEMENT_PROJECT</description> <files> <filename plugin="avancement_project">avancement_project.php</filename> </files> <config> <fields name="attribs"> <fieldset name="basic"> <field name="display_label" type="radio" default="1" label="FLEXI_FIELD_DISPLAY_LABEL" description="FLEXI_FIELD_DISPLAY_LABEL_DESC"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </field> </fieldset> <fieldset name="style"> <field name="style_css" type="list" default="0" label="FLEXI_FIELD_AVANCEMENT_PROJECT_STYLE_CSS" description="FLEXI_FIELD_AVANCEMENT_PROJECT_STYLE_CSS_DESC" > <option value="0">FLEXI_FIELD_AVANCEMENT_PROJECT_GREEN</option> <option value="1">FLEXI_FIELD_AVANCEMENT_PROJECT_BLUE</option> <option value="1">FLEXI_FIELD_AVANCEMENT_PROJECT_RED</option> <option value="1">FLEXI_FIELD_AVANCEMENT_PROJECT_YELLOW</option> <option value="1">FLEXI_FIELD_AVANCEMENT_PROJECT_ORANGE</option> </field> </fieldset> </fields> </config> <languages> <language tag="fr-FR">fr-FR.plg_flexicontent_fields_avancement_project.ini</language> </languages> </extension>

But the resultat is:

As you can see, the fieldset "style" doesn't appear...
What's the problem?
I watch other field contents like "text", "image"...etc but i dont see what's the problem..

My file.php is empty for the moment...coïncidence?

I tried to solve the problem by mylsef, but i'm not very comfortable with the internal structure of FLEXIcontent.

Thanks for your help

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

More
10 years 6 months ago #40184 by ggppdk
Hello,

myfield.php should not be empty

www.flexicontent.org/index.php/d ... -type.html


-- 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
10 years 6 months ago #40202 by tghpow
Hello,

When i said my field.php is empty, but i meant functions are empty (displayOnField...etc), but not the whole file^^

Because i start field's development, i wanted to write lines after the others, to understand the system.

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

More
10 years 6 months ago #40235 by tghpow
it's ok, i forgot to correct the name of the second fieldset.
So it's <fieldset name="group-nameOfMyField" > and not <fieldset name="group-text">.

Thanks, but now i have an other problem.
In the function onDisplayField, my variable $field must have many parameters, but my $field->parameters is empty (exept the display_label)..

Do you know why? And mainly, how can i have these params?

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

More
10 years 6 months ago #40256 by ggppdk
Hello

try duplicating a field that is easier to make replacements

e.g. weblink field

then do case-sensitive replacement of
'weblink' with 'myfieldname'
in both .xml and .php files
(also remember to rename the filed)

then do a case-insensitive search of 'weblink' to see what else exists


-- 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
10 years 6 months ago #40266 by tghpow
yeh, i copied the field "text".
I modify text by "avancement_project" (name of my field).

I can manipulate the field, because, recently, i change the function OnDisplayValue and it's work. I will re-copy a field this night to try but... i would like to understand^^

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.283 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