[correct fieldname] create a personal field problem with xml

5 years 1 day 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:
<?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.

5 years 20 hours ago #40184 by ggppdk


-- 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 review. Thanks!

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

5 years 11 hours 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.

4 years 11 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.

4 years 11 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 review. Thanks!

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

4 years 11 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.

4 years 11 months ago #40279 by tghpow
... Arf ... Never name a file with "_" ...
Avancement_project dont work, but avancementproject work :lol:

Thanks for ur help

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

4 years 11 months ago #40283 by ggppdk
Hello

ok thanks for feedback,

just note that field
relation_reverse.php
has underscore in its name and it work, i am not sure where you placed the underscore

Also note that duplicating 'text' field is harder because "text" appear at various places that do not relate to the field name


-- 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 review. Thanks!

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

4 years 11 months ago #40317 by tghpow
Oh you right... So what was the problem? :lol:

I will think about that.
Thanks for y our help, and your advice

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

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.