Questions tagged [post]
The post tag has no usage guidance.
27 questions
2
votes
1
answer
93
views
Variable entry does not exist on blog post
We just installed the CMS and like it very much. On the other hand while following the basic tutorial we seem to get the error "Variable "entry" does not exist." on the most simple ...
2
votes
2
answers
1k
views
CSRF token using Craft as an API
Our Craft site needs to exchange data with our customer in-house APP. And at some point it needs for the APP to POST us updates.
We set some sort of API with a Api and Secret Key to exchange between ...
2
votes
1
answer
551
views
404 Error Controller Action From Jquery But Not Url
I'm able to call my controller action directly from a url in the browser and get the proper response but when I call it from a page with js I get a 404 error. I'm working off the solution found here ...
1
vote
2
answers
587
views
Calls to /actions return 400 Bad Request
I'm trying to use jquery ( and/or VueJS with axios) to delete an asset from a frontend form (user is logged in and they have permissions to delete assets from this volume)
I have an HTML element that ...
1
vote
1
answer
213
views
What does {{ hiddenInput('enabled', '1') }} in an entry form do?
What's the purpose of {{ hiddenInput('enabled', '1') }} in an entry form?
<form method="post" accept-charset="UTF-8">
{{ csrfInput() }}
{{ actionInput('entries/save-entry') }}
{{ redirectInput('...
1
vote
1
answer
684
views
Bad Request: Post Request Required when saving hyperlink in specific redactor field
I'm having a strange issue here. I have a site running Craft 3.3.7. I have an entry with a matrix field with several redactor fields in it. In one of those redactor fields, I have a paragraph of text. ...
2
votes
2
answers
63
views
How to process POST and entry fields when using same form for Add as Edit on front end?
I use the same form for adding an entry on the front end as I do for editing it.
So when editing it, we need to insert the field values in the fields.
When editing or adding it we also need to re-...
0
votes
2
answers
468
views
Hyperlinks in blog are not showing underlined
I'm brand new to Craft, having been a Wordpress user. I'm managing a site for a small charity.
Having done some new pages and a blog page without any problem, I did a blog yesterday in which the ...
1
vote
1
answer
180
views
plugins route post controller?
I am developing a custom authentication plugin for Craft 3. But I can't route to my Controller via POST request with my login form. Request via GET work
1
vote
2
answers
76
views
Storing data for page in twig
I'm using craft-stripecheckout to accept payments on my site, but want to email the user with the custom fields after they have been redirected.
Easiest way to describe this is below:
Page 1 - User ...
1
vote
1
answer
1k
views
How to handle form submissions?
So I am coming from WordPress and typically I would typically handle a post by either hooking into the wp_post action and access the $_POST request that way. Now I believe Craft is built on Yii which ...
1
vote
2
answers
111
views
Craft CSRF protection and Facebook Tab
I have a Craft 3 installation and want to add a tab/app to Facebook like domain.com/facebook
Facebook sends a post request to the configured secure tab URL. Now when Craft's CSRF protection is ...
1
vote
0
answers
386
views
How do I send a POST request using the Dukt REST plugin?
The plugin documentation is somewhat lacking, but based on the documentation that exists and looking at the plugin files, I believe a post request should take the following form:
{% set response = ...
2
votes
1
answer
959
views
Bad Request with weird params
I just installed Craft fresh, there's almost nothing in my DB as I'm just beginning to develop a plugin. All I want is to save a new entry from the frontend of my website. I've done this before in ...
1
vote
1
answer
530
views
POSTing data into Craft
I have a site set up that uses Craft as a CMS only, not used to display templates, as this is handled by React JS separately.
My site is set up so that Craft responds on /api.
I cannot for the life ...
1
vote
1
answer
418
views
Is it possible to return data/models from controller to template via setRouteVariables?
I'm trying to write a plugin that lives in the admin interface, that reads external data (a cinema program), parses it, and creates entries based on this (movie info and screening times).
While doing ...
2
votes
1
answer
175
views
Express Server posting user data to Craft
First of all let me just say that I have only been using Craft for a few months and still has allot to learn about it.
My issue is quite simple in that I have an express server running to display the ...
2
votes
1
answer
958
views
Ajax Post to guestEntries/saveEntries from another domain
I have a separate Craft install that I am using to communicate to a few different sites. I have a front-end form on another one of these sites (a React.js app) that is looking to post back to this ...
1
vote
1
answer
729
views
SQLSTATE[23000]: Column 'targetId' cannot be null
I'm getting the following error whenever I try to post a new entry to one of my channels in Craft:
2015/10/26 14:42:36 [error] [system.db.CDbCommand] CDbCommand::execute() failed: SQLSTATE[23000]: ...
1
vote
1
answer
975
views
Registration email link not being sent
I'm using the following form, and occasionally through testing the e-mail activation link will send, however the majority of time it never gets sent. Did I do something wrong with the form?
<form ...
2
votes
1
answer
1k
views
Get _POST from Select element in Form
I'm trying to get the _POST data for my form in a plugin, and for whatever reason am unable to get the selected option from a select tag:
<form class="parseResults" action="actions/MyPlugin/...
1
vote
1
answer
752
views
How to create entry from external app webhook?
I want to create an entry in an existing channel via a webhook from zoho crm. It's pretty straightforward. Like many apps, Zoho's webhook allows you to specify destination url, the method (get or post)...
2
votes
1
answer
554
views
Pixel & Tonic's Contact Form Plugin - POST submissions to Zapier Webhook URL?
I'm still a beginner with PHP so please bear with me. I've installed the Contact Form plugin for Craft by Pixel and Tonic, and have it configured to work as expected.
However, I'd like to have the ...
1
vote
1
answer
142
views
Posting an entry without using a form?
I'd like to create a history section so logged in users can see which pages they have visited.
Is there a way to post an entry without using a form? So the user does not have to click to say he has ...
3
votes
2
answers
409
views
Multiple category output in auto generated entry title
I have a single category field (named category) in my section and I am looking to use the auto-generated title to keep these entries titled consistently. I have had success outputting the first ...
3
votes
1
answer
713
views
Compose URL POST parameters to filter entries by category?
How do you update an URL with new params?
I'm working on a search / filter entries page. I have multiple menu lists with categories in it. Like this:
Size:
Small
Medium
Large
Color:
Blue
Red
White
...
4
votes
2
answers
3k
views
Access POST data to conditionally display form
I'm working with the contact form plugin and would like to test for post data to see if the form was just submitted.
It seems this code always throws a template error.
Variable "test" does not exist
...