Hi,
I am using the ajax driven entry form for a safecracker upload. Therefore I have added this code as suggested.
<html>
<head>
{exp:jquery:script_tag}
<!--using the jQuery Form plugin <a href="http://jquery.malsup.com/form/-->">http://jquery.malsup.com/form/--></a>;
[removed][removed]
[removed]
$(document).ready(function(){
$('#publishForm').ajaxForm({
dataType: 'json',
success: function(data) {
if (data.success) {
alert('You successfully added a new entry with entry_id '+data.entry_id)
} else {
alert('Failed with the following errors: '+data.errors.join(', '));
}
}
});
});
[removed]
</head>
<body>
{exp:safecracker channel="products" return="safecracker/ENTRY_ID" entry_id="{segment_2}" json="yes"}
<label for="title">Title</label>
<input type="text" name="title" id="title" value="{title}" size="50" maxlength="100">
<label for="url_title">URL Title</label>
<input type="text" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50">
<label for="entry_date">Date</label>
<input type="text" name="entry_date" id="entry_date" value="{entry_date}" maxlength="23" size="25">
<input type="submit" name="submit" value="Submit">
{/exp:safecracker}
</body>
</html>I seperated the head content from the body content. Now when I submit the information. I get a blank page with this line:
{"success":1,"errors":[],"field_errors":[],"entry_id":"48","url_title":"herhreh","channel_id":"8"}Shouldn’t the errors appear without refreshing the page?