Skip to main content
3 votes

How to reference an entry field in a guest user form?

So, I found the answer after much digging. Thanks to this answer https://craftcms.stackexchange.com/a/9831/7962 I see that the entries field type has to be referenced with an additional set of ...
David Pritchard's user avatar
3 votes

Guest Entries creating new entry instead of editing the current one

I got it to work by adding the below at line 182 of GuestEntriesController.php $entry->id = craft()->request->getPost('entryId'); Then I added a hidden field with the current ...
CongdonJL's user avatar
2 votes
Accepted

Is it possible to output message on successful save with Guest Entries?

You could append a query string on your redirect url that you can then query for in your template. I've used this to display different messages for a new post or an edited post. <input type="...
Luke Pearce's user avatar
  • 3,863
2 votes
Accepted

How do you get entry's data from Ajax form submission with Guest plugin?

According to the README, the Guest Entries plugin accepts an AJAX request, and returns an object containing the entry ID, title, and so forth. As such, if you're using jQuery, you should be able to ...
Stephen Lewis's user avatar
2 votes
Accepted

Check for errors (any) on guest entry form (Craft 3)

You can use this {% if entry.hasErrors() %} Render a message here {% endif %}
Robin Schambach's user avatar
2 votes
Accepted

Guest Entries plugin - set parent entry if using section

The Guest Entries plugin checks for a parentId value in POST and passes that on to saveElement, so that should be all you need to do: https://github.com/craftcms/guest-entries/blob/v2/src/controllers/...
Brad Bell's user avatar
  • 67.5k
1 vote
Accepted

How to stop spam with guest entries plugin?

Don't hack your code into Craft's source files. You very rarely want to modify vendor code, so that dependencies can always be cleanly installed using Composer. Instead, use an event to hook into the ...
MoritzLost's user avatar
  • 11.5k
1 vote

Matrix field validation on guest entry submission

To grab validation error of a matrix field -> first block type -> field, you must access entry's matrix field with the function first() and than access block type field using getError("fieldHandle") ...
Dominik Krulak's user avatar
1 vote

Guest entries - send confirmation mail to person who filled out entry

Assuming the person that applied has a text field they entered their email address on in the Guest Entry, then the plugin has an onSuccess event that gets fired when a guest entry is successfully ...
Brad Bell's user avatar
  • 67.5k
1 vote

Guest Entries plugin will only submit when logged in - not anonymously (via AJAX)

So can now answer this myself. Basically the issue is the CSRF token validation. Options are to disable CSRF in the config.php file. Up to you how comfortable you are with that. Or use the CSRF ...
TimC's user avatar
  • 21
1 vote
Accepted

Can a JS string variable be used in Twig?

As Twig is rendered server side before passed to a browser for JS execution I found out that it can't be done except FOSsRoutingBundle which allows you to expose your routing in your JavaScript code. ...
Dominik Krulak's user avatar
1 vote

I am unable to successfully submit guest entries

As per the documentation, you need to include a hidden sectionId field. This specifies the section to which the entry will be submitted.
Stephen Lewis's user avatar
1 vote
Accepted

Guest Entries - Two ajax forms for different section entries. Receiving 404 only on second form?

I shall answer my own question. The issue was because I was logged in as admin in another browser tab. I was not receiving the "Unauthorized" response from craft. Just the 404. By testing in an ...
Brendan's user avatar
  • 21
1 vote
Accepted

Three duplicated guest entries posted on form submision

The site is running through CodeKit compiler connected to MAMP server. This was odd because it has never happened before with same configurations but When I run the site directly from MAMP server the ...
Dominik Krulak's user avatar
1 vote

You don’t have the proper credentials to access this page

More recently, you're required to install the Guest Entries plugin and configure it to allow public posts. Without said configuration, submissions will be rejected one way or another.
Matt Stein's user avatar
  • 4,006
1 vote

Is it possible to use `guestEntries.beforeSave` to validate custom fields?

The only model passed into the guestEntries.beforeSave event and returns from it is Craft's EntryModel, so even if you create your own MyEntryModel inside the event with it's own attributes and ...
Brad Bell's user avatar
  • 67.5k
1 vote

Before saving Guest Entries, redirect to an entry review page?

Not a Craft specific answer but you could use JS to prevent the form from submitting, and instead save those values in a cookie. After doing so, redirect the user to the review page, and use the ...
Chase Giunta's user avatar
1 vote

Before saving Guest Entries, redirect to an entry review page?

You can listen for the beforeSave event, but by redirecting or rendering another template, you're essentially hijacking the request and cancelling the initial save. You could fork the plugin and add ...
Brad Bell's user avatar
  • 67.5k
1 vote

Is it possible to output message on successful save with Guest Entries?

From what I can tell, Luke's answer wont actually work, because ultimately after the saveEntry event, GuestEntries will redirectToPostedUrl, which will lose any variables you have passed. You options ...
Tim Kelty's user avatar
  • 3,081

Only top scored, non community-wiki answers of a minimum length are eligible