6 votes
Accepted

Update form entry using the Guest Entries plugin

In Craft 3 / Guest Entries 2, you could pull this off without hacking Guest Entries by writing a module that listens to the beforeSaveEntry event, and sets the id on the entry. use Craft; use craft\...
user avatar
4 votes

Update form entry using the Guest Entries plugin

I've figured it out Go to GuestEntriesController.php and add this line of code on the 182nd line $entry->id = craft()->request->getPost('entryId'); Then add an hidden input field with the ...
user avatar
  • 485
4 votes
Accepted

Using the Guest Entries plugin, how can I allow people to edit/delete?

What you could try is to use the Preparse plugin and add a field to your entry type that automatically generates a secret key for each submitted entry. Show the user this key on the page they are ...
user avatar
  • 35.8k
4 votes

Can guests upload files to assets in an entry form?

I just tested this locally and it's working fine (with the caveat that the latest build 2.1.2568 introduced a separate, unrelated bug that broke front-end asset uploading that's been fixed in build 2....
user avatar
  • 66.4k
4 votes
Accepted

Ajax Post to guestEntries/saveEntries from another domain

TL;DR: Turns out this was an issue with my apache config on the Craft instance. Explanation: I did a little digging around the GuestEntriesController.php file and noticed that Craft was not picking ...
user avatar
3 votes
Accepted

Guest Entries - Saving entries as drafts

Edited based on comment below No sorry I see what you mean now. But I think with entry drafts you need to have first published an entry, then you create a draft from that entry, essentially creating ...
user avatar
  • 4,519
3 votes

Submit via ajax to Guest Entries plugin

Ok found the solution to this. All input fields must have the following format fields[handle] - i was just using the handle! Example: <input name="fields[firstName]" id="firstName" type="text" ...
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 ...
user avatar
3 votes

Set status 'pending' on Guest Entry form

The "status" on an entry isn't explicitly set like that. It is determined based on other properties of the entry. You will need to set these other criteria for the entry to appear as "pending". An ...
user avatar
  • 3,833
2 votes

Empty relation field validation failed with Guest Entries plugin

It looks like it's doing what it should. When you set a field to 'required', you are basically telling the system to not let the entry be saved if you haven't filled out the field you've set 'required'...
user avatar
2 votes
Accepted

GuestEntries plugin problem.

The plugin is expecting the POST parameter to be sectionId rather than opiniones. Changing the name attribute on that hidden input to sectionId should fix your issue. The other requirements when ...
user avatar
2 votes
Accepted

Send email notification to user's email when their entry has been enabled

You could build a small plugin to hook into Craft's onBeforeSaveEntry event (docs). Before the entry is saved (and enabled), you'd check if it was previously disabled and its new status is live, if it ...
user avatar
  • 7,160
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/...
user avatar
  • 66.4k
2 votes
Accepted

Single type for entry submission on error loses entry object

From the README: If there is a validation error on the entry, then the page will be reloaded with an entry variable available to it... You can override the variable name by setting the ...
user avatar
1 vote

Basic Relation save

You'd use this syntax: <input type="hidden" name="fields[fieldHandle][]" value="123" /> Note the value should be the ID of the entry you want related. There's a handy guide here for the front-...
user avatar
  • 66.4k
1 vote

Using Recaptcha v2 and Guest Entries plugin

I don't have much experience with these, but here are some potential plugins you can look into for Craft 2 that use various anti-spam techniques: https://straightupcraft.com/craft-plugins/snaptcha ...
user avatar
  • 66.4k
1 vote

Guest Entries - How I can send message to user after saving form information

You could do this with a small plugin that listened to the Guest Entries afterSaveEntry event. The logic would look something like this: use craft\guestentries\controllers\SaveController; use craft\...
user avatar
  • 66.4k
1 vote

Send e-mail notificacion ( including attached files ) after user send information with Guest Entries

Instead of using the Postmaster plugin, which appears abandoned and hasn't been updated since 2016, you could write a simple plugin that listened to the afterSaveEntry event. That plugin could grab ...
user avatar
  • 66.4k
1 vote
Accepted

Can entries disabled by default in Guest Entries plugin and in section be enabled from the front-end?

Currently, that won't work. The Guest Entries plugin looks at the plugin's setting for whether that entry should be enabled for the given section or not, not anything from $_POST. https://github.com/...
user avatar
  • 66.4k
1 vote

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 ...
user avatar
  • 21
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 ...
user avatar
  • 66.4k
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 ...
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 ...
user avatar
  • 66.4k
1 vote

Empty relation field validation failed with Guest Entries plugin

I've run into this same issue without the field being "required", so I don't think that is the problem. I can recreate the problem by submitting a relationship input with an empty string as a value (...
user avatar
  • 3,061
1 vote

Using the Guest Entries plugin, how can I allow people to edit/delete?

Using the Guest Entries plugin, how can I allow people to edit/delete? As it currently stands, you can't. The Guest Entries plugin was written to accept new entries only. That's largely because, as ...
user avatar
  • 66.4k
1 vote

Can GuestEntries edit existing entries?

Not sure if this is of use to you, and if you use it I would recommend ensuring that you use is with security in mind. But someone has forked the GuestEntries plugin to allow editing and deleting of ...
user avatar
1 vote

Can GuestEntries edit existing entries?

Correct. It currently only allows for creating new entries, not editing existing ones.
user avatar
  • 66.4k

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