Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Problem with Form Label from FORK 29 May 2015 20:12 #13198

I created my FORK for my form to add some new fields.
then I was trying to change the Form label in order to show NEW or EDIT respectively.

Then when I changed the label name in the form. it does not read the new value. It just keep showing the original form label.
Original form:
<fieldset name="contractassets.form"
			addfieldpath="/administrator/components/com_mycomponent/models/fields"
			label="MYCOMPONENT_JFORM_NEW_EDIT_VIEW_2">

FORKED FORM:
<fieldset name="contractassets.form"
			addfieldpath="/administrator/components/com_mycomponent/models/fields"
			label="MYCOMPONENT_JFORM_EDIT_VIEW">

It does not read the new label from my FORKed from.


Please help.
ALSO could you tell me how would it be the best procedure to recognize which label to print according if it is a NEW item or Edit Item in the form view.
Something alone the lines like
<legend><?php echo ($my_code_is_new)? JText::_($fieldSets['contractassets.form']->label) : 'My EDIT LABLE HERE';?></legend>
//OR
	<legend><?php echo ($this->item->id != 0)? 'My EDIT LABLE HERE' : JText::_($fieldSets['contractassets.form']->label);?></legend>
MS - Lyquix

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

  • Page:
  • 1
Time to create page: 0.052 seconds

Although I found this tool some time ago I just started learning experimenting and building this first component on Monday and now on Thursday afternoon it's already online. Although I already had a working version done with another tool this is much easier to build and at the end you have the freedom to own your own component. Once you know how to use Cook you will boost your productivity as the learning curve is really moderate compared to many other tools.
Giori (Forum)

Get Started