Forums

Using values from session leads to an error

nebelparder 12 Sep, 2016
Hey there...

I' have a big problem with my forms and no idea how to solve it.
Well, I installed CF and CC and it works like a charm - most of the time.

I have defined an connection and set up the CC-toolbar to create new records (_TOOLBAR_NEW_). This presents me the defined form with empty fields. In this form I created to fields whitch catches a value from the system:

<input type="hidden" name="Dossier[id]" id="id" value="" />
<input type="hidden" name="Dossier[teacher]" id="teacher" value="<?php echo JFactory::getUser()->id; ?>" />
<input type="hidden" name="Dossier[learner]" id="learner" value="<?php echo JFactory::getSession()->get('learner', ''); ?>" />


Until now, everythings fine.. šŸ™‚

But, as soon as I submit the form I the IE debugger displays the following error:
Syntax error, unrecognized expression: #chronoform-dossier_edit :input[name^=Dossier.teacher]
File: jquery.min.js, Zeile: 2, Spalte: 12727


😲


What to do to solve this error?

Thanks in advance!!!
GreyHead 14 Sep, 2016
Hi nebelparder,

I'm not sure exactly what is happening here - my guess is that it is something to do with the use of array names that is upsetting jQuery.

The simplest solution is probably to check the User id after the form is submitted and get the info then.

Bob
This topic is locked and no more replies can be posted.