Questions tagged [frontend]

The tag has no usage guidance.

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

Frontend Form for editing entries HTTP Exception

I took the example form of the craft CMS Entry Form Documentation page and tried to use it on a test site. However i always get a HttpException after submitting the Frontend Form. Here's the Stack ...
0
votes
0answers
25 views

Can a lightswitch field accept true or false as a posted value?

I have a frontend form that allows users to toggle a lightswitch field. I discovered that the entry does not update correctly when passing true or false with the request, despite my frontend receiving ...
1
vote
1answer
44 views

Craft 3: Searching within back-end & front-end isn't giving all entries/results

Searching within Control Panel as well as the front-end is not going through all entries. When I try searching in the Content tab I see the pages are listed but when I try to search for the entry it ...
1
vote
1answer
25 views

How to check if a user's new email has been verified

Background When the user setting Verify email addresses? is enabled, and the user's email is reset by a non-admin the address requires verification before being used as explained here. This does not ...
2
votes
2answers
249 views

“Request missing required body param” error when creating entry on front end

I get an Request missing required body param error when trying to create a new entry on the front end. All required fields are being filled. Nothing changed except the craft version. Craft version is ...
1
vote
2answers
42 views

Passing variables between sibling blocks

Is there any possibility to use "entry" from the for-loop inside the "main" block inside another block ("header" in my case)? See example below: {% extends "main" %} {% block header %} ...
1
vote
2answers
229 views

How to browse uploaded assets on the front end?

I have a frontend entry form which included a file field to upload files to the entry. All works fine. I even have a delete function to remove individual uploaded files from the entry. The problem ...
0
votes
1answer
125 views

How to get one entry's related stuff in Vuejs component

For example, in a vuejs component, i send a ajax request to get an article. And in this article, there is a relation field called relatedTopics. How can I get this article's relatedTopics with ...
2
votes
1answer
116 views

Display/edit Sprout Form entry in front end

Following Sprout Forms -- How to link to individual entries on the front-end I found code {% set formEntryId = craft.request.getSegment(2) %} {% set entry = craft.sproutForms.getEntryById(...
1
vote
1answer
92 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
20 views

Override the postDate for entries so their URL works on the frontend?

Is it possible to override/disregard the postDate for all entries in a section so that they are visible on the frontend even if this date is in the future? I realise I could add a dedicated date ...
0
votes
1answer
451 views

How to set up Google Tag Manager correctly

First time user here, can any please provide information on how to best implement the GTM tag container? Is it possible to hard code it? Or is the only way to add a plugin?
0
votes
1answer
60 views

Craft 2: Locale throwing 404 in frontend

I have my two locales set up as described in the official documentation. I am able to translate my pages and fields in the CP as supposed to and have two versions ready in the backend, both with a ...
1
vote
0answers
131 views

Front End New Entry Form

I am trying to create a form that allows users to rate a restaurant (which is another section) by creating a "userRatings" section entry. userRatings has three fields: a dropdown field called ratings, ...
1
vote
1answer
315 views

How to restrict access to some section in front-end for admin user only?

I know this is a basic question, but i never use Craft this way. I need to show a section ( list of items ) in the frontend but only available for admin users ( that are already logged in the control ...
2
votes
2answers
317 views

Front End Form with Dropdown in Matrix - Adding New

I've got a Matrix field called Emergency Contacts (handle: emergencyContact) that I'm setting up so that users can add/update on the front end. It has one block type - contact - with 4 fields: Name (...
1
vote
1answer
46 views

craft.entryRevisions.getDraftsByEntryId(entry.id) is returning an empty array

I'm trying to get the drafts for the entry on the front end to populate my plugin on the sidebar but cannot get the drafts returned with this code in a Twig template. entry is an EntryModel here. ...
1
vote
1answer
363 views

Get a field's required attribute in frontend form

I am trying to get the required attribute of a field in a frontend form. I know this attribute only makes sense in the context of an entry type. Doing this craft.fields.getFieldByHandle('handle') ...
1
vote
2answers
92 views

Unable to get front-end Profile form to save changes

This is my first attempt at setting up a front-end form so my users can update their profile information. The profile is using the VZ Address plugin for the address field. When I go to the page, it ...
2
votes
2answers
223 views

Frontend Form - Checkboxes cannot “all” be unchecked

I have a frontend entry form with some checkboxes that is not behaving correctly. If you uncheck all options and save, nothing changes (this is bad). However if you uncheck one item and check another ...
1
vote
1answer
169 views

Users are always logged out on front end

Users are always logged out on the front end on my Craft website. Even when logged in as admin I can access the CMS but on the front end user session always returns the following. Craft\...
7
votes
2answers
1k views

Live preview using Vue.js

I'm building a Vue.js site with Craft as the backend, which works pretty well so far. The only thing I can't get to work yet is live preview. Vue-Router relies on the window.location which is flawed ...
1
vote
1answer
205 views

How can I add banner slider on my home page?

I want to add slider on my home page. How can I add slider?
1
vote
1answer
86 views

First Craft CMS build need help with tabs with images

Good evening, I am new to Craft CMS. I have been a MODX builder for a while and decided to make the move to Craft. I have begun building and I am trying to make a simple way for the user to manage ...
1
vote
1answer
304 views

Override admin template with own template

How can I override the following admin template in Craft 2? craft/app/templates/users/_edit.html I've tried placing the template in my own template directory, like: templates/users/_edit.html but ...
1
vote
1answer
37 views

How to prevent non-image files being uploaded through frontend form?

Is this possible? At the point of upload, the entry field isn't checked so anything can be uploaded, which is a bit worrying. Then again, if it's an Amazon S3 bucket, does it even matter? It won't be ...
2
votes
1answer
415 views

How to output first segment title/channel name of entry?

For example, I have channel entry https://site.dev/news/2017/test and I would like to output "News" section name on entry page.
1
vote
1answer
206 views

Simple category-entry search filter

I'm trying to figure what would be the simplest way to do such filtering: I would like to make it in that way that selecting one of "Specialities" category would limit results from the selected "...
1
vote
2answers
268 views

Issue with uploading files from frontend

I'm currently trying to implement a simple file-upload form with CraftCMS. However, even though there are no errors on submitting the form, no file actually seems to get uploaded. This is the form: ...
2
votes
1answer
139 views

Can't include relative JS file from layout

I'm trying to include the videojs.thumbnails.js file in my layout.html: <script src="./videojs.thumbnails.js"></script> It's located at the same level. I am getting the following error: ...
2
votes
1answer
338 views

Does a up to date boilerplate for Bootstrap 4 with live reload, sass and js build exist?

I'm pretty new to Craft, and a noob when it comes to build tools. Coming from WordPress I've been using Roots/Sage which is a starter theme with liveReload(browserSync), Bootstrap 4, SASS and JS ...
1
vote
1answer
357 views

How to implement radiobuttons field on frontend registration form?

I want to add a question to a frontend registration form. The radiobuttons are just 'Yes' or 'No'. I've created a radiobutton field and added that to users > fields. If I add this option to the form,...
2
votes
1answer
475 views

Front end assets uploading, does not appear to be a an image error

I have a front end form for entries. All other fields are working fine however my assets keep throwing errors. My assets location is set to 'Images/{slug}' in the CP. Server info tells my ...
2
votes
1answer
395 views

How to modify entry with a users field in the front-end?

Is it possible to modify an field of an entry within the front-end? Something like this with an action URL: <a href="{{actionUrl('save/entry', {userfield:user.id}) }}">add user to userfield of ...
1
vote
1answer
346 views

Reuse chosen dropdown field value on frontend

I would like to choose entry values from a frontend dropdown and reuse the chosen value directly. {% set entries = craft.entries.section('mountainbikes') %} <select name="year"> {% for entry ...
0
votes
1answer
2k views

Update a user image on the front end using Vue.js and Ajax

Following on from this question I am now looking at adding, deleting and updating a user's image on the front end using Vue.js and vue-resource. I have the delete functionality working no problem but ...
10
votes
5answers
10k views

Updating a user on the front end with Vue.js and Axios

I currently have a working profile update form using purely craft but I would like to now enhance that using Vue and Axios to update via Ajax. I may well submit a couple of questions rather than put ...
2
votes
1answer
556 views

Correct way of showing errors when editing profile via front-end form?

I've been looking at the following resources: https://craftcms.com/docs/templating/user-profile-form Allow user to change or delete their photo for their profile from the front end Front end edit: ...
0
votes
2answers
119 views

How to stop a Slider [closed]

We've got a HeroSlider on our website, and I no longer wish for the slider to slide (if that makes sense?). Currently the homepage is 3 slides, however when I remove the 2 slides I don't want, the ...
1
vote
1answer
394 views

frontend form action: save as draft or publish

in my frontend entry form I have a "save as draft" submit button. The current action for this form is the following, which saves the entry submitted through the form as a draft (status: disabled): &...
1
vote
1answer
138 views

UX issue with new email verification link

I'm working on a profile management form for a site with public registration enabled. I'd like users to be able to change their email address. I've got it working as Craft intended -- they enter their ...
2
votes
1answer
228 views

Front End Asset Management - Upload New Photos without Deleting/Overriding Existing

I'm trying to create a front end system where users can create and manage listings with multiple photos. Everything saves as a draft until approved by an admin. In the front end edit page, uploading ...
1
vote
1answer
142 views

Tags via AJAX actionTrigger

I pretty much followed this and the answer there really helped me a lot so far. Currently I'm stuck with either a 500 (Internal Server Error) or a 400 (Bad Request) Error. My craft/storage/runtime/...
2
votes
1answer
938 views

How do I export search results as a csv?

I have set up a custom search of entries on a page in my Craft site which includes filters to filter the results. I would like to be able to export these results (filtered or otherwise) as a CSV ...
1
vote
1answer
73 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/...
1
vote
2answers
54 views

Frontend form database error with empty Users field

Within a frontend Add Product form (using Craft Commerce) I'm having problems with a database error whenever a Users field is left empty. Here's the field: {% set teachers = craft.users.group('...
3
votes
2answers
661 views

Send activation mail from front end

I am building a site where all the content (and users) are being managed using the front end. The site owner needs to invite customers to the site but would like to control the time when that customer ...
2
votes
0answers
93 views

How can I validate/make a matrix field required on the front-end?

I am displaying inputs on the front-end of my form that are populating a matrix within the CP. Overall everything is working fine. The problem I am having is validation. I've got the field marked as ...
9
votes
3answers
3k views

Use Vue.js with Craft

I want to build my first website with Vue.js but have difficulties how to start. Craft and Vue.js both use {{ }} as delimiters, but I found out that I can change this for Vue. So to start, I tried ...
0
votes
1answer
373 views

Front-end entry field validation problem

I have this simple code: <form method="post" accept-charset="UTF-8"> <input type="hidden" name="action" value="entries/saveEntry"> <input type="hidden" name="redirect" value="...