We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [saveentry]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

Redirect to paginated page after saving Entry within CP

If you are editing entries and then save the entry via the save button, craft redirects you back to page 1 of the element index. I feel we should be able to set our own options as to if we want to ...
1
vote
1answer
224 views

Redirect after saving an entry

The question was already asked (Possible to redirect elsewhere after saving an entry?) but this was about Craft 2.x. Up until now I used the following code in my plugin (I took it from one of the ...
0
votes
0answers
24 views

Is it possible to know which fields have been changed when a user save an entry?

Event::on(Entry::class, Entry::EVENT_BEFORE_SAVE, function (ModelEvent $event) {}); What I can found in docs is EVENT_BEFORE_SAVE hook. But I can only get the updating entry from the params. Is it ...
0
votes
0answers
53 views

Craft 3 cannot upload file to entry in Control Panel

Cannot upload file to entry in CP from a form in the frontend of the site. The flash message in the CP is: Entry could not be saved. {% set section = craft.sections.getSectionByHandle('areaprivada') ...
2
votes
1answer
46 views

Update a lightswitch field in Craft CMS 2

How can I edit a lightswitch field in an entries field layout via PHP? This is my current approach public function actionSponsoredEntriesPriority() { $this->requireAdmin(); $this->...
0
votes
1answer
558 views

Craft 3 - Save new Entry with Relations (Categories/Assets)

i simply can not get my "job" done. I try to create a plugin for Craft, a simple one. It reads some date and should create new entries out of this data. First i stuck on a stupid save-mistake, someone ...
0
votes
1answer
81 views

Entry not saving when Redactor bold

I'm having a weird issue with the Rich Text Editor (Redactor -> simple.json, only "bold" and "italic") on newly added fields and only ONE (that i know of) older field. Every time i add a "bold" format ...
1
vote
1answer
40 views

Allow registered end-user to update entry, but limited only to specific fields (Craft 3)

I want to allow end-users (registered as users in Craft) to update only specific fields of an entry. I know that only those fields included in the form are being updated; but this isn't secure enough. ...
1
vote
1answer
86 views

How do I change the value of a select box field of a certain entry through the front-end?

So I'm having this entry (a product) that contains a selectbox field with two values: Reserved Available By default this field is set to 'Available', but when the user lands on a certain page (a ...
1
vote
1answer
104 views

Radio buttons in matrix field not saving

Craft CMS version 3.0.9 (updated from 3.0.1 to try and fix). I have a layout field in a matrix box with the radio buttons field type with the options normal (default), full, left, right. When saving ...
1
vote
1answer
51 views

Posting children to a Structure

This question is a follow up of a previous question see: (Entry Form - Multiple Entries & Entry Type & Parent) I am trying to add multiple children to a pre-existing multi level structure: ...
0
votes
0answers
57 views

Editing expired entries from the front end

I'm trying to edit an expired entry from the front end. However, when I hit save, none of the changes persist and a redirect doesn't take place. Entries that have a live status are fine. Even when I ...
1
vote
1answer
56 views

How to save multiple related entries on the frontend with 1 checkbox?

I have a frontend form and would like to save multiple related entries by checking 1 checkbox. I have this working to save 1 related entry: <input type="checkbox" id="user-type-select-{{ userType|...
1
vote
2answers
291 views

Craft entries won't save (new or edits)

So I am trying to create a new entry, but every time I click save, nothing is actually saved. (see gif) THINGS I HAVE TRIED: Overwriting the app folder with a freshly downloaded one (I am already ...
1
vote
1answer
2k views

How to save a new entry with custom fields - Craft 3

I'm trying to create a new Entry via PHP, with custom fields (Craft 3). I can save it, however my custom fields don't appear. I've tried using setFieldValue, as well as $entry->excerpt = 'Lorem...';...
1
vote
1answer
31 views

Single type for entry submission on error loses entry object

I have created a contact form inside a single entry type 'contact' for front end submissions. This lets me display editing options for title and body and display the form. When submitting the form, ...
2
votes
1answer
192 views

Can entries be disabled by default for 2/3 of the languages on my website

I have a 3 language website that I made for a client. The website is in Dutch, Japanese and English. When my clients creates a new entry, most of the time they want to have the Japanese and English ...
1
vote
1answer
118 views

How to submit custom fields that are added in the right pane to your plugin?

I'm making my first Craft plugin. I have added custom fields to the right of an entry form with the cp.entries.edit.right-pane hook ("Share on.."). But I can't seem to find how to 'transfer' these ...
1
vote
1answer
91 views

Entry should not activated by default

Would it be possible that when you create a new entry, it's not activated by default? I know there is a "Draft" option... But is there an option for this? Best, Marcel
1
vote
1answer
60 views

Built in validate of title when using EntryModel?

The example below will continue to save entries with the same title and slug. Is there a built in validation when using craft()->entries->saveEntry? $entry = new EntryModel(); $entry->...
1
vote
1answer
72 views

Entry not saving when date isn't changed using frontend form

When editing an entry (actually it's a product within Craft Commerce but everything seems the same) with a pre-existing date, the field looks like this: <input name="fields[date][date]" value="06/...
2
votes
2answers
608 views

Update form entry using the Guest Entries plugin

I am trying to create a form that anyone can submit regardless if they are logged in or not. I found the Pixel & Tonic Guest Entries plugin for this. Now that I've installed and configured the ...
1
vote
1answer
494 views

Problem saving new entry populated with setContentFromPost() while setContent() works

I'm building a cinema program, and I'm trying to build entries for movies and shows loading external data via a plugin. I'm getting close, but now I've hit a roadblock trying to save the entries. I ...
0
votes
1answer
320 views

How to handle entry save in plugin when entryId is not set?

Referring to my older question, I have the entryId working on an existing entry. However I've noticed a new entry doesn't have an entryId set (makes sense). I have some custom information in text ...
0
votes
1answer
62 views

Craft\Exception on saving entries having images

I have created a new entry in which user can also add images(already uploaded or new upload) I can save entry successfully if I don't add any images to it. When I add any image and try to save the ...
2
votes
1answer
145 views

Entry slug auto appends -1 even when the original slug is unique

I have an entry slug like this: cics-west-belden-1 the -1 seems to be auto appended to the slug, but there are no other entries with the project cics-west-belden in my project. When I remove the -1 ...
1
vote
1answer
586 views

Entry Form: redirect not working

I use a front-end entry form based on the official documentation (https://craftcms.com/docs/templating/entry-form), but after saving the entry, I am running in an error 404 on the entry page. <...
2
votes
1answer
114 views

Checking for first time an entry is “published” i.e. saved with a Live status

Is there a way, via an Event or otherwise, to catch the first time a post is saved and isn't in disabled mode? I want to send out an email alert to users when a new entry is published, but I want it ...
1
vote
1answer
593 views

How to handle multiple users simultaneously editing an entry?

If 2 or more people are editing a entry at the same time in Craft, the last person to save the entry overrides everyone else's work. It doesn't seem any diffing is involved to resolve this. I'm using ...
2
votes
2answers
87 views

Losing focuspoint on saveEntry by plugin

I've implemented a plugin for synchronizing an external Database into my Craft project which also includes images. Those images have a focuspointer but i lose the focuspointer onSaveEntry by my ...
2
votes
1answer
631 views

Craft\EntryModel and its behaviors do not have a method or closure named “ui”

I'm getting this error when saving a post which has a Matrix field. Craft\EntryModel and its behaviors do not have a method or closure named "ui". I have ran a search in my templates and don't have ...
2
votes
1answer
208 views

Can't rename slug

Each time I try to rename a slug within an entry, the page refreshes, but the slug is getting a -1 appended. The slug I want is: forms. The slug I get after saving is: forms-1. I've checked through ...
1
vote
1answer
67 views

Model validation not run when using EntriesService saveEntry method

Currently i have to validate my model before saving because of some custom validation rules setted on the model which won't run when using the EntriesService saveEntry method. This causes a two step ...
0
votes
1answer
280 views

<form><matrixBlock><checkbox></matrixBlock></form> How do I store multiple form entries in 1 table field?

A tricky one. I have a form which sits on a section entry template. When user submits form from one page of the template, it saves the entries into the table. BUT user going to another page of the ...
2
votes
3answers
178 views

Entry validation not working when Publish live changes permission is not checked

when a user with no permission to publish is submitting a blank entry, the entry is saved anyway without any errors. Here is the permissions set to the user group: I have few required field as ...
4
votes
1answer
591 views

How to use select dropdown with entries/saveEntry for an entry field?

How to use select dropdown with entries/saveEntry for an entry field? I have an entry with a field that is another entry, which I want to update with a form: <form method="post" accept-charset="...
0
votes
1answer
523 views

Foreign key constraint sql error from entries/saveEntry when adding entry

I am getting a foreign key constraint sql error when trying to add an entry through a front end form. <form method="post" accept-charset="UTF-8"> {{ getCsrfInput() }} <input type="hidden"...
0
votes
1answer
63 views

onBeforeSaveEntry is hanging on import

I am using the Import plugin. This question doesn't have to do with the Import plugin which seems to be working swell, but instead with my onBeforeSaveEntry logic which seems to have botched the ...
2
votes
1answer
343 views

Assign entry id to title with entry form

I have an entry form to take user generated content. The section it passes the info to has a customised title format Submission ID: {id} However, when the entry gets submitted, the title in the CP (...
1
vote
1answer
163 views

saveEntry() not firing

I'm using code I've been using to update existing entries for a while now and it's failing to fire following the 2.5 upgrade. Trying to figure out what might have changed, or if there's something I'm ...