A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Hello,
I am building a simple gadget where I have some inout fields and a Submit button that executes a javascript to read the form fields and display a result on the gadget.
I read a number of articles, looked at the QuickChat sample but whetever I do, I can't make it work.
if I include the [Gadget(ClientScriptInitMethod = "URLBuilderGadget.init")] instead of [Gadget], I receive the following message which is displayed before the form:
Cannot read property 'guid' of undefined
The javascript is very simple:
require(["dojo/domReady!"],(function($, epi) {
epi.URLBuilderGadget = function () {
// object returned by function.
// Exposes public methods and variables.
var pub = {};
pub.init = function(e, gadget) {
$(this).bind("epigadgetsubmit",
gadgetSubmit);
};
var gadgetSubmit = function (e, gadget)
{
alert('Submit Click');
};
return pub;
} ();
} (epiJQuery, epi)));
The Index.cshtml is:
@{
Layout = null;
}
The submit action is not working.
This is on EPiServer 7.5.
Many thanks
Yannis