Please note that Form2Content is no longer being developed. All files from the latest version can be found on Github.

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Bernd Schaumburg
  2. F2C Front-end / menu settings
  3. Wednesday, 20 September 2017
  4.  Subscribe via email
Hi,
we're in trouble since the last update. We're running Joomla 3.8.0 (problem was the same with 3.7.x) with F2C 6.16.0.
We work with several forms on our website. All articles are edited at the frontend.
Everything works fine but one type of form won't behave like it should.
Only the cancel button works. If I click on the save or apply button nothing happens but at the Chrome console I get this error:


Uncaught TypeError: Cannot read property 'value' of null
at F2C_ValDateField (f2c_frmval.js?49f08140b9d46e92c808685da3b95bc9:35)
at Object.Joomla.submitbutton (index.php?option=com_form2content&task=form.display&view=form&layout=edit&id=77&Itemid=652:416)
at HTMLButtonElement.onclick (index.php?option=com_form2content&task=form.display&view=form&layout=edit&id=77&Itemid=652:425)
F2C_ValDateField @ f2c_frmval.js?49f08140b9d46e92c808685da3b95bc9:35
Joomla.submitbutton @ index.php?option=com_form2content&task=form.display&view=form&layout=edit&id=77&Itemid=652:416
onclick @ index.php?option=com_form2content&task=form.display&view=form&layout=edit&id=77&Itemid=652:425
f2c_frmval.js?49f08140b9d46e92c808685da3b95bc9:35


But there is no date field in this form which could require this validation.

At the backend everything works perfectly...

Any ideas to solve this problem?
Responses (15)
Accepted Answer Pending Moderation
Hi Bernd,

To clarify for other readers. This has nothing to do with Joomla upgrade to 3.8.

Now some questions to track down the issue:

  • Does it work in the back-end?
  • Do you use overrides for your submission form. If so switch off and test
  • Do you use required fields, if so can you turn those required on one by one
  • Something appears to be different on this form to te others.... any ideas?

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 1
Accepted Answer Pending Moderation
Hi Patrick,

step by step...


  • yes, it works in the back-end
  • do you mean language overrides?
  • there are no required fields in this form
  • sorry, no ideas
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 2
Accepted Answer Pending Moderation
The complete admin area runs with the protostar template.
No overrides.
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 3
Accepted Answer Pending Moderation
Hi Bernd,

The only thing I can think of is a JS conflict that happens just in that form. From the error it seems to have to do with a date value. Do you have a link to the form so I can get Julien our programmer to look at it?

Regards,

Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 4
Accepted Answer Pending Moderation
It's in the Site Details now.

regards
Bernd
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 5
Accepted Answer Pending Moderation
Hello Bernd,

Is it possible to send me an Akeeba back-up of this site, plus an exact description on how to reproduce this issue?

You can send the back-up to julien at opensourcedesign dot nl

Thanks!

best,
Julien
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 6
Accepted Answer Pending Moderation
Hello Bernd,

Thanks for sending the back-up! That was a quick way for me to find the problem.

You have set the Date Created to show in the front-end, but you have not included it in your custom submission form (team_fussball_form.tpl)

This should have triggered a warning or error in our component, but this did not happen. I'm still looking why...

What you can do in the meantime is the following:

1) Include the data created field in your submission template

OR

2) Switch the display in front-end to 'no'

One of these should make it work again!

best,
Julien
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 7
Accepted Answer Pending Moderation
I would like to set the date created not to be shown in the frontend. But if I do so, I get this error code:
Form2Content Fehler : Feld F2C_CREATED ist nicht für die Anzeige im Front-End gesetzt, ist aber im F2C Submission Form Template anwesend.
But F2C_CREATED is not in the template... so where's the bug?

This is the form template:

{php}
function UserIsAdmin($uid = 0) {
$in_admin_group = false;
$user = JFactory::getUser();
$usergroups = $user->groups;
$admin_groups_ids = array(8,11); // 8: Super User, 11: Team Admin
foreach ($admin_groups_ids as $agid)
{
if (in_array($agid,$usergroups)) $in_admin_group = true;
}
return $in_admin_group;
}
{/php}
<div class="f2c_button_bar">
{$F2C_BUTTON_APPLY}{$F2C_BUTTON_SAVE}{$F2C_BUTTON_SAVE_AND_NEW}{$F2C_BUTTON_SAVE_AS_COPY}{$F2C_BUTTON_CANCEL}
</div>
<div class="clearfix"></div>
<div class="row-fluid form-horizontal">
<div class="control-group f2c_field f2c_title">
<div class="control-label f2c_field_label">{$F2C_TITLE_CAPTION}</div>
<div class="controls f2c_field_value">{$F2C_TITLE}</div>
</div>
<div class="control-group f2c_field f2c_tags" {php} if (!UserIsAdmin()) echo "style='display: none;'"; {/php}>
<div class="control-label f2c_field_label">{$F2C_TAGS_CAPTION}</div>
<div class="controls f2c_field_value">{$F2C_TAGS}</div>
</div>
<div class="control-group f2c_field f2c_created_by" {php} if (!UserIsAdmin()) echo "style='display: none;'"; {/php}>
<div class="control-label f2c_field_label">{$F2C_CREATED_BY_CAPTION}</div>
<div class="controls f2c_field_value">{$F2C_CREATED_BY}</div>
</div>
<div class="control-group f2c_field f2c_STAFFEL">
<div class="control-label f2c_field_label">{$STAFFEL_CAPTION}</div>
<div class="controls f2c_field_value">{$STAFFEL}</div>
</div>
<div class="control-group f2c_field f2c_TEAMINFOS">
<div class="control-label f2c_field_label">{$TEAMINFOS_CAPTION}</div>
<div class="controls f2c_field_value">{$TEAMINFOS}</div>
</div>
<div class="control-group f2c_field f2c_INTERN">
<div class="control-label f2c_field_label">{$INTERN_CAPTION}</div>
<div class="controls f2c_field_value">{$INTERN}</div>
</div>
<div class="control-group f2c_field f2c_FOTO">
<div class="control-label f2c_field_label">{$FOTO_CAPTION}</div>
<div class="controls f2c_field_value">{$FOTO}</div>
</div>
<div class="control-group f2c_field f2c_TRAINING">
<div class="control-label f2c_field_label">{$TRAINING_CAPTION}</div>
<div class="controls f2c_field_value">{$TRAINING}</div>
</div>
<div class="control-group f2c_field f2c_TRAINER">
<div class="control-label f2c_field_label">{$TRAINER_CAPTION}</div>
<div class="controls f2c_field_value">{$TRAINER}</div>
</div>
<div class="control-group f2c_field f2c_TRAINER_EMAIL">
<div class="control-label f2c_field_label">{$TRAINER_EMAIL_CAPTION}</div>
<div class="controls f2c_field_value">{$TRAINER_EMAIL}</div>
</div>
<div class="control-group f2c_field f2c_TRAINER_TELEFON">
<div class="control-label f2c_field_label">{$TRAINER_TELEFON_CAPTION}</div>
<div class="controls f2c_field_value">{$TRAINER_TELEFON}</div>
</div>
<div class="control-group f2c_field f2c_COTRAINER">
<div class="control-label f2c_field_label">{$COTRAINER_CAPTION}</div>
<div class="controls f2c_field_value">{$COTRAINER}</div>
</div>
<div class="control-group f2c_field f2c_COTRAINER_EMAIL">
<div class="control-label f2c_field_label">{$COTRAINER_EMAIL_CAPTION}</div>
<div class="controls f2c_field_value">{$COTRAINER_EMAIL}</div>
</div>
<div class="control-group f2c_field f2c_COTRAINER_TELEFON">
<div class="control-label f2c_field_label">{$COTRAINER_TELEFON_CAPTION}</div>
<div class="controls f2c_field_value">{$COTRAINER_TELEFON}</div>
</div>
<div class="control-group f2c_field f2c_BETREUER">
<div class="control-label f2c_field_label">{$BETREUER_CAPTION}</div>
<div class="controls f2c_field_value">{$BETREUER}</div>
</div>
<div class="control-group f2c_field f2c_BETREUER_EMAIL">
<div class="control-label f2c_field_label">{$BETREUER_EMAIL_CAPTION}</div>
<div class="controls f2c_field_value">{$BETREUER_EMAIL}</div>
</div>
<div class="control-group f2c_field f2c_BETREUER_TELEFON">
<div class="control-label f2c_field_label">{$BETREUER_TELEFON_CAPTION}</div>
<div class="controls f2c_field_value">{$BETREUER_TELEFON}</div>
</div>
<div class="control-group f2c_field f2c_ERGEBNISSE">
<div class="control-label f2c_field_label">{$ERGEBNISSE_CAPTION}</div>
<div class="controls f2c_field_value">{$ERGEBNISSE}</div>
</div>
<div class="control-group f2c_field f2c_SPIELPLAN">
<div class="control-label f2c_field_label">{$SPIELPLAN_CAPTION}</div>
<div class="controls f2c_field_value">{$SPIELPLAN}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR1">
<div class="control-label f2c_field_label">{$SPONSOR1_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR1}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR1BANNER">
<div class="control-label f2c_field_label">{$SPONSOR1BANNER_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR1BANNER}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR2">
<div class="control-label f2c_field_label">{$SPONSOR2_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR2}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR2BANNER">
<div class="control-label f2c_field_label">{$SPONSOR2BANNER_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR2BANNER}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR3">
<div class="control-label f2c_field_label">{$SPONSOR3_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR3}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR3BANNER">
<div class="control-label f2c_field_label">{$SPONSOR3BANNER_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR3BANNER}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR4">
<div class="control-label f2c_field_label">{$SPONSOR4_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR4}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR4BANNER">
<div class="control-label f2c_field_label">{$SPONSOR4BANNER_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR4BANNER}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR5">
<div class="control-label f2c_field_label">{$SPONSOR5_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR5}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR5BANNER">
<div class="control-label f2c_field_label">{$SPONSOR5BANNER_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR5BANNER}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR6">
<div class="control-label f2c_field_label">{$SPONSOR6_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR6}</div>
</div>
<div class="control-group f2c_field f2c_SPONSOR6BANNER">
<div class="control-label f2c_field_label">{$SPONSOR6BANNER_CAPTION}</div>
<div class="controls f2c_field_value">{$SPONSOR6BANNER}</div>
</div>
<div class="control-group f2c_field f2c_GALERIE">
<div class="control-label f2c_field_label">{$GALERIE_CAPTION}</div>
<div class="controls f2c_field_value">{$GALERIE}</div>
</div>
<div class="control-group f2c_field f2c_ANHANG1BEZEICHNUNG">
<div class="control-label f2c_field_label">{$ANHANG1BEZEICHNUNG_CAPTION}</div>
<div class="controls f2c_field_value">{$ANHANG1BEZEICHNUNG}</div>
</div>
<div class="control-group f2c_field f2c_ANHANG1">
<div class="control-label f2c_field_label">{$ANHANG1_CAPTION}</div>
<div class="controls f2c_field_value">{$ANHANG1}</div>
</div>
<div class="control-group f2c_field f2c_ANHANG2BEZEICHNUNG">
<div class="control-label f2c_field_label">{$ANHANG2BEZEICHNUNG_CAPTION}</div>
<div class="controls f2c_field_value">{$ANHANG2BEZEICHNUNG}</div>
</div>
<div class="control-group f2c_field f2c_ANHANG2">
<div class="control-label f2c_field_label">{$ANHANG2_CAPTION}</div>
<div class="controls f2c_field_value">{$ANHANG2}</div>
</div>
<div class="control-group f2c_field f2c_ANHANG3BEZEICHNUNG">
<div class="control-label f2c_field_label">{$ANHANG3BEZEICHNUNG_CAPTION}</div>
<div class="controls f2c_field_value">{$ANHANG3BEZEICHNUNG}</div>
</div>
<div class="control-group f2c_field f2c_ANHANG3">
<div class="control-label f2c_field_label">{$ANHANG3_CAPTION}</div>
<div class="controls f2c_field_value">{$ANHANG3}</div>
</div>
</div>
<div class="clearfix"></div>
<div class="f2c_button_bar">
{$F2C_BUTTON_APPLY}{$F2C_BUTTON_SAVE}{$F2C_BUTTON_SAVE_AND_NEW}{$F2C_BUTTON_SAVE_AS_COPY}{$F2C_BUTTON_CANCEL}
</div>
<div class="clearfix"></div>


regards
Bernd
Attachments (1)
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 8
Accepted Answer Pending Moderation
Hi Bernd,

So you are using template override. That was my first question ;)
Just to be sure that things work without the override can you test by switching it off temporarily (in Content Type manager setting) and see if the form works. Always good to know before spending possible time looking in the wrong direction.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 9
Accepted Answer Pending Moderation
Sorry, I didn't knew that you meant this. I thought the question was about language overrides like I asked in my post.
Accepted Answer Pending Moderation
If I switch off the submission form template, the apply and save buttons work fine.

But if I switch it back on again I get the same error, saying that F2C_CREATED is not set for the frontend but it is in the template. But believe me, it's not in the template. It's the same template as posted before.

Even if I use the standard form which is generated by F2C, the error occurs.

regards
Bernd
Accepted Answer Pending Moderation
I have a workaround but it's not a real solution.
I've included the created field and disabled the visibility.
Now it works but I would really like to know why this error occurs.

regards
Bernd
Accepted Answer Pending Moderation
Hi Bernd,

Thanks for the updates. Agree, we will look into this!

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
Accepted Answer Pending Moderation
Hi Bernd,

Yes I can see that there's a bug in the algorithm that detects which template variables you are using.
I will see how I can fix this. For the meantime: I'm glad you found a workaround!

best,
Julien
Accepted Answer Pending Moderation
Thanks for the info !!
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.