Questions tagged [frontend]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
10 votes
5 answers
17k 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 ...
Gareth's user avatar
  • 1,605
9 votes
3 answers
5k 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 ...
obs's user avatar
  • 509
8 votes
1 answer
471 views

Using Commerce to pay for posting entry

I'm trying to figure out how to do the following: Person registers as new user User creates a new entry with a front-end entry form Entry is saved as disabled so it's not publicly visible User has ...
Cavell Blood's user avatar
8 votes
1 answer
1k views

How to update Matrix field on frontend for user profile

I have used the following code to allow our users to update their own profile. Everything works fine apart from not being able to update existing Matrix entries. New Matrix field entries work fine. ...
GlennJ's user avatar
  • 575
7 votes
2 answers
1k views

Code for resending the activation email

When logging in indicates the 'account has not been activated', how do I create a link for resending the activation email? Update I want users to be able to enter their email address in an input ...
Marnix Harderwijk's user avatar
7 votes
2 answers
4k 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 ...
Moritz Friedrich's user avatar
6 votes
4 answers
3k views

Has anyone converted a Bootstrap based website to Craft?

Is there any reason you wouldn't want to do this? EDIT: More info I have a website that was built in HTML/CSS and over the years, it's been modified, added to and hacked at to the point where the ...
Henry's user avatar
  • 127
5 votes
1 answer
1k views

Login As User from Frontend

In the CP there is a button which allows you to log in as a specific user. Can this be called from the Frontend/plugin or is it strictly a CP function?
David A McInnis's user avatar
5 votes
1 answer
345 views

Entries retain field data that has been removed from entry type layout

I have a single page section titled "About". At one point, I had assigned a "text" Rich Text field to the entry type layout. I then put some filler text in this field and saved the entry. Later I ...
monkeyArms's user avatar
4 votes
1 answer
2k views

Is it possible to change a user's password in the front-end?

Is it currently possible to change a user's password in for example the profile edit form? I'm currently using the forgot password approach for this.
Hasco's user avatar
  • 171
4 votes
1 answer
2k views

How to upload an asset from a front-end form

I've found information on how to upload an asset as part of creating an entry. What I am trying to do is upload an asset from the frontend without creating an entry. I have a logged in user, and what ...
Marion Newlevant's user avatar
4 votes
2 answers
956 views

Using Craft CMS with Foundation 6 (for Sites)

So I finally am climbing on board the Craft CMS train, but I have a quick question about how some of you more seasoned Craft-users do things. I do a lot of my work using the Foundation framework (by ...
alexandersix's user avatar
4 votes
1 answer
387 views

Loading an existing entries drafts in template/frontend

I've been searching for a method to load in an existing entries drafts. Here is what I am trying to implement. User can add or edit an entry from the front end of my craft site. They cannot publish. ...
etx's user avatar
  • 95
4 votes
1 answer
1k views

How do I retain form input values after submitting error-ridden form containing matrix field inputs

I'm looking for a way to keep matrix inputs populated with their original value after submitting a form containing errors. I'm already aware of the method of doing this for general inputs as shown ...
ntoombs19's user avatar
4 votes
1 answer
909 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="...
Marion Newlevant's user avatar
3 votes
1 answer
636 views

Get draft content in front end form

I have a live entry with an 'eventTime' text field having the content '2pm'. I also have an unpublished draft saved for that same entry with the 'eventTime' field having the content '3pm'. I use the ...
user avatar
3 votes
2 answers
1k 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 ...
Marcus Scheller's user avatar
3 votes
1 answer
1k views

Managing Frontend JS for Matrix Fields

What is the best course of action to allow the creation/deletion of matrix fields in front-end. For context this in a Commerce Order Field. JS is mess right now, any underlying Craft JS libraries I ...
Dale Inverarity's user avatar
3 votes
1 answer
2k 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 ...
user5824's user avatar
3 votes
1 answer
1k views

Allow users to change email address on front-end form

I've got a front-end user profile form working on a client site I'm developing, but the one thing that I'm having trouble with is allowing users to change the email address associated with their ...
Adam Snetman's user avatar
3 votes
1 answer
542 views

How do I update the state of lightswitches reliably using checkboxes on a frontend user profile form?

I've got a frontend user profile form that is successfully setting the values of custom fields in the backend except for some lightswitch fields I've added to my user profiles. I have the following ...
Adam Snetman's user avatar
3 votes
1 answer
1k views

Access data when posting to controller from front-end

I'm writing a plugin to notify authors when a Disqus comment is posted. There is a Disqus JS callback you can use to hook into this, so I'm doing the following on the front-end: this.callbacks....
Trevor Davis's user avatar
3 votes
1 answer
344 views

Saving asset title in frontend form

I have a frontend form to save an entry which includes a file upload input field: <input type="file" name="fields[newsFile]"> The upload works fine, but is it also possible to set the title of ...
fingerfood's user avatar
2 votes
2 answers
2k 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 ...
Marcus Scheller's user avatar
2 votes
3 answers
44 views

can't figure out how to embed youtube videos

My video embeds are working but they are way too small. I've read around in circles how to do this but it's not working. I have a field called videoUrl (it's a URL field). I'm using Video Embedder ...
rudtek's user avatar
  • 169
2 votes
2 answers
493 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 ...
CreateSean's user avatar
  • 1,963
2 votes
1 answer
654 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.
curious's user avatar
  • 383
2 votes
1 answer
1k views

Error when submitting Date Field from the front-end: cannot be blank

Am using the Pikaday datepicker to add a Date field to the front-end of a Craft site: https://github.com/dbushell/Pikaday This is for integration with the Formerly add-on and the date is set to ...
Cole Henley's user avatar
  • 1,741
2 votes
1 answer
1k views

Add variable to twig context

I have created an event to transform the entry data before rendering the page so that it's ready to render components in the template. Event::on(View::class, View::EVENT_BEGIN_PAGE, [$this, '...
Callum's user avatar
  • 193
2 votes
2 answers
404 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 (...
Todd's user avatar
  • 284
2 votes
1 answer
321 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 ...
Aaron Ransom's user avatar
2 votes
2 answers
1k views

Using the CP login session expiration for the frontend

I love the session handling on the backend CP. The prompts that come up on session expiration after setting 'userSessionDuration' => 'PT5M', in config/general.php are exactly what I want to use on ...
Merlin's user avatar
  • 173
2 votes
2 answers
692 views

Call to Craft Users Login Function from Plugin

I am migrating a 15,000+ users from a site's old CMS (WP), and have them set to Pending. All of their user information will be created and on Craft CMS, except their passwords will not be set, as ...
taylor's user avatar
  • 1,128
2 votes
1 answer
193 views

How get entries by sources in a frontend fieldlayout?

I have multiple entries fields that I want to use in the front-end. In the field settings I'll set up a sections source for each field. On the frontend I want a dropdown select box with all the ...
Maarten Heideman's user avatar
2 votes
1 answer
237 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: ...
Molly Harper's user avatar
2 votes
1 answer
790 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 ...
shorn's user avatar
  • 438
2 votes
1 answer
275 views

Get data from another loop from outside the current loop

Sorry the question title is so random - feel free to correct it to something more succinct if you can think of one. Related question: How to query for multiple relations with SuperTable I have a ...
darylknight's user avatar
  • 3,290
2 votes
1 answer
1k views

Add, remove, and append entries to an entries field via frontend form

I'm making a one-button form, to add an entry to an entries field. Adding seems pretty straightforward, but it overwrites any previous entry that occupied the entries field. How would I append an ...
Chase Giunta's user avatar
2 votes
2 answers
629 views

Edit multiple entries at once through the front-end

I am making/trying to make a reservation system with Craft. Logged-in members should be able to make a reservation for a hotel room on the front-end, and change it later. I am keeping a stock for the ...
Bart Rylant's user avatar
2 votes
1 answer
825 views

How can I skip a required field if is not in the form?

The problem is that I have a register page where I have 3 fields, Username, Email, Password. There is another page with some more fields which are required. So when I try to register a user form my ...
Alex's user avatar
  • 427
2 votes
1 answer
325 views

Activate correct locale upon front-end entry

Is there any way, upon creating new entries via front-end form, to not have all locale versions of those entries active? I’d like to think I could just set something like <input type="hidden" name=...
Chase Giunta's user avatar
2 votes
1 answer
256 views

Front End Entry Form - File/asset field not saving when ajax submitted

I have a front end entry form which submits and saves fine when not using ajax. But when i do submit via ajax the text fields etc save fine but the file/assets field will not. I have stripped it right ...
mmc501's user avatar
  • 1,779
2 votes
1 answer
821 views

Can I use Redactor on my front end?

I'm building a simple user backend and I would like to use Redactor for a couple fields. I see Redactor is a commercial product. When I pay for Craft Pro does that include a license to use Redactor? ...
etx's user avatar
  • 95
2 votes
1 answer
364 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 ...
Stef van Zon's user avatar
2 votes
1 answer
396 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(...
Amanda Lutz's user avatar
2 votes
1 answer
415 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 ...
Simen's user avatar
  • 21
2 votes
1 answer
538 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 ...
Maarten Heideman's user avatar
2 votes
1 answer
707 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: ...
Robert Tolton's user avatar
2 votes
1 answer
208 views

Changing the frontend sorting according to different fields

I am creating a site that has a list of events that I need to be able to sort by different fields. I know how to do it statically in my templates but I want to enable it in the front end. For the ...
LessMore Creative Studio's user avatar
2 votes
1 answer
576 views

Entries Field Type Validation

I am having some issues understanding why validation is not working on my entry forms. I've got an entry with several field types which aren't of type "entries" and the required validation is working ...
Panda4Man's user avatar
  • 253