Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [frontend]

The tag has no usage guidance.

0
votes
0answers
20 views

How to redirect the page with params?

In the front-end, I create a form and submit the data to backend. In the controller, if got some errors, I would like to redirect to the previous page with some information. I tried like this: return ...
0
votes
0answers
9 views

Edit entry from section “B” when the front end of section “A” entry changes

Is it possible to edit an entry within a different section? I have a front end for say section “A” that pulls in a list of entries’ titles from a different section “B”. Is it possible to update an ...
0
votes
0answers
22 views

How to save a file to an asset folder from the frontend?

I have a frontend canvas element that users can draw on that outputs as an SVG. If the users clicks a share button I want to save that SVG to an asset folder to then display a collection of all the ...
0
votes
1answer
17 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 ...
0
votes
0answers
20 views

Clear entry-field from front end form

I'm having trouble saving an entry from a front end form.. I have a select field with users: with options (loop over users) But I also want an empty option field above it so: <select name="fields[...
2
votes
1answer
54 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
30 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
17 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
143 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
35 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
56 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
94 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 ...
0
votes
0answers
170 views

Rich Text Editor (Redactor) in Front-End, can't paste anymore after updating to 2.6.2993

We updated Craft CMS to version 2.6.2993. There is a Rich Text Editor (RTE) field, that's being used in the Front-end of the website (Inside a form). It uses Redactor to include the functionality for ...
0
votes
0answers
47 views

Integrity constraint violation when saving product after creating a tag (frontend form)

I have a Create Product form on the frontend which works absolutely fine 99% of the time. The missing 1% is when I create a tag immediately before submitting the form. The tag is created fine and a ...
1
vote
2answers
182 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
32 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
176 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
77 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
108 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
137 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\...
5
votes
1answer
465 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
103 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
68 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
175 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
34 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 ...
1
vote
1answer
237 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
164 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
131 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
80 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
300 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
225 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,...
3
votes
1answer
332 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
258 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
235 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
1k 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
4answers
7k 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
397 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
96 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
328 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
114 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 ...
3
votes
1answer
160 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 ...
0
votes
0answers
44 views

Notifications for front-end user email change [duplicate]

I'm working on front-end profile management templates on a site that allows public user registrations and I'm trying to figure out the cleanest way to allow users to change their email addresses. In ...
1
vote
1answer
122 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
619 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
63 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
45 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
470 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
81 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
2k 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
302 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="...