Self-Registration, submitting form reloads current page

117 views
Skip to first unread message

jlucz...@gmail.com

unread,
Dec 8, 2023, 10:14:33 AM12/8/23
to XMPie Interest Group
I am attempting to setup a self-registration page. When I fill out the form and hit submit the page reloads and nothing else happens. No  success url, no failure url, no error message, nothing posted to the database.

Not sure what I'm missing.

jlucz...@gmail.com

unread,
Dec 8, 2023, 10:17:02 AM12/8/23
to XMPie Interest Group
<!DOCTYPE HTML>

<html lang="en">
<head>
<title>Title</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="assets/css/main.css" />
<noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
<!-- XMPie XMPL library -->
        <link href="https://ajax.xmcircle.com/ajax/libs/xmpl/3.1.4/xmp/css/xmp.css" rel="stylesheet" media="screen">
        <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
        <script src="https://ajax.xmcircle.com/ajax/libs/xmpl/3.1.4/xmp/js/xmp.min.js"></script>
        <script src="./xmpcfg.js"></script>
</head>
<body class="is-preload" ng-app="xmp.app"
ng-controller="XMPAnonymousPage"
xmp-cloak>

<div id="page-wrapper">
<div id="wrapper">
<section class="panel color4-alt">
<div class="inner columns divided">
<div class="span-3-25">
<form xmp-register>
<h2 style="color: #003777">Sign Up</h2>
<div class="fields">
<div class="field">
<label for="Email">Email</label>
<input type="Email" xmp-write-ador="xmp.r.Email" required name="Email" id="Email" xmp-tracking-action="Email edited"/>
</div>
<div class="field">
<label for="Fname">First Name</label>
<input type="text" xmp-write-ador="xmp.r.Fname" required name="Fname" id="Fname" xmp-tracking-action="Fname edited"/>
</div>
<div class="field">
<label for="Lname">Last Name</label>
<input type="text" xmp-write-ador="xmp.r.Lname" required name="Lname" id="Lname" xmp-tracking-action="Lname edited"/>
</div>
<div class="field half">
<label for="Company">Organization Name</label>
<input type="text" xmp-write-ador="xmp.r.Company" required name="Company" id="Company" xmp-tracking-action="Company edited"/>
</div>
<div class="field half">
<label for="title">Job Title</label>
<input type="text" xmp-write-ador="xmp.r.title" name="title" id="title" xmp-tracking-action="title edited"/>
</div>
</div>
<ul class="actions">
<li><input type="submit" value="Submit" class="primary" ng-click="forgetRecipient()" xmp-success-url="thanks.html"/></li>
</ul>
</form>
</div>
</div>
</section>
</div>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/main.js"></script>

</body>
</html>

west-digital.fr

unread,
Dec 8, 2023, 12:35:02 PM12/8/23
to XMPie Interest Group
Any error message in your browser console?
Maybe you should try removing the call to your duplicate jquery.
Not tested, though.

jlucz...@gmail.com

unread,
Dec 8, 2023, 12:53:51 PM12/8/23
to XMPie Interest Group
If I view my index.html file from the local website folder, everything works as it should (outside of saving data). Click submit... goes to thanks.html.
I changed everything to a personal webpage for testing purposes, and I get the "Recipient ID is not valid" error when viewing the local html.
Thoughts?

west-digital.fr

unread,
Dec 11, 2023, 1:51:56 PM12/11/23
to XMPie Interest Group
I do not understand, what you are trying to test with "I changed everything to a personal webpage for testing purposes, and I get the "Recipient ID is not valid" error".

Again, does your console contain errors or warning? If not, try to set the "xmp-success-url" to "#" (or simply remove the statement): this will force the browser to stay on your page, thus preserving potential errors or warnings in the console.

Also, as I suggested before, did you remove the duplicate call to second jquery?

Also, in the uProduce Dashboard, does the Port job related to your project contain any message?

couch

unread,
Dec 11, 2023, 8:50:22 PM12/11/23
to XMPie Interest Group
A few points:
* Jquery is loaded twice in your self registration page as Guillaume points out.
* xmp-tracking-action is not really relevant on an anonymous page - there is no user (recipient id) to track it against.
* your submit button is telling the browser to forget who the recipient is, (remove the cookie and state information) so after inserting the recipient, when the browser loads the thanks.html page, there is no recipient id 
* when you try to preview an xmpl html page locally (by double-clicking on your computer) there is no cookie or state information, so there is no recipient id unless you add it in the url by adding the query string like: thanks.html?rid=aValidRecipientId (substituting a valid id of course). The cookie/state will only be available when using a web server and you don't trigger the forgetRecipient().

jlucz...@gmail.com

unread,
Dec 14, 2023, 1:30:00 PM12/14/23
to XMPie Interest Group
I am using the base URL created from circle. Will this not work?
Reply all
Reply to author
Forward
0 new messages