13

It is! To do so, they will have to be logged in and input their old password. They need the old password to change their email or update a password. Here's an example: {% macro errorList(errors) %} {% if errors %} {% for error in errors %} <div class="error icon-cancel-circled">{{ error }}</div> {% endfor %} {...


11

You will need to write a plugin with three responsibilities: Keep track of which entries have been purchased Set an entry to enabled when it has been purchased Ensure that entries always have the correct status (enabled/disabled) whenever they are saved For the first one, you will need to create a new DB table that can store records of which entries have ...


9

That's not going to be possible to do without a plugin. The plugin would need to provide its own Controller which does the following: Grab info about the uploaded file using UploadedFile::getInstanceByName() Determine the ID of the asset folder you want to upload the file to using AssetsService::findFolder() Move the file into the folder using ...


9

Unlike Vue Resourse (if you've used it), Axios does not have a good way to emulateJSON on legacy servers or frameworks that do not understand submissions sent as application/json. Your data gets to Craft but it is not understood, leaving POST empty. You would need to have Axios submit to your own controller, where you can read the raw data, JSON decode it, ...


8

Figured this out myself. The 'getDraftsByEntryId' function is only intended for displaying the list of drafts, so there is no need to populate the model (a potentially expensive task). Indeed, there is a line that unsets the 'fields' part of the data in the EntryRevisionsService.php file: // Don't initialize the content unset($result['data']['fields']); ...


8

I know the problem here is solved, but I thought I'd just leave a link to a pretty decent intro to using Craft and Vue 2.0 for future reference... Using Vue 2.0 with Craft CMS And specifically the part addressing the problem above: It’s all about the mustaches NOTE: I'm not the author of the blog post, just found it useful.


7

I want to be able that users can enter their emailaddress in an input and that the activation link gets resend You'll need to write a plugin, which can generate activation URLs using the UsersService: echo craft()->users->getPasswordResetUrl($user); If you want to send the user an activation email instead of echoing a link in the frontend, you can ...


6

I'll be flat-out honest; I didn't read through your code. Secondly, I think to set expectations when you say a matrix field on the front-end you'll need to understand it isn't going to look like what you think it looks like within the CP. With that said, on a site I am working on, I have a page where a user can update their profile on the front-end. There ...


6

Your code is correct but you need to add another line near the top: <input type="hidden" name="fields[volunteerPositions]" value=""> From the documentation: If you are including a Checkboxes field on a front-end entry from, make sure to include a hidden input before the checkboxes, so that an empty value is submitted if no checkboxes are checked.


5

Go to the Users section of the Control Panel (mysite.com/admin/users/). Click on the user account that needs to be activated. Click on the settings cog on the right side (see attached image), and choose which option works for you. Hope this helps!


5

After doing some digging around I found the getDraftsByEntryId(entryId, locale) method of the craft.entryRevisions service that might help. The following should return the first draft of an entry. Note: there is a second argument for 'locale', which defaults to current locale if none provided. Also not sure whether 'first' or 'last' would be considered the ...


5

You can call it from the front-end, but it requires the currently logged in user to be an administrator. Just point the form's hidden action input to users/impersonate and have it submit a 'userId' input of the person you want to log in as.


5

The input tag presented in the comments above does not appear to use the correct input tag format for the date field. To submit a date field on the front-end, your input fields need to be setup with the following name structure and value format: <input type="text" size="10" name="fields[fieldHandle][date]" value="10/15/2012"> <input type="text" ...


5

Unless I'm misunderstanding, it should be as simple as: {{ entry.section.name }}


5

Craft 3.2 introduces Headless Preview which works a treat with SPA's. Essentially Craft exposes tokens which you can forward on to subsequent Element API requests and Craft will do the rest. The interesting thing to note with this release is that Live Preview isn't actually "live" rather draft entries that are saved and accessible by tokens generated to ...


4

I built Progress.org using Craft and Bootstrap—and it only took me about two months of part-time work. I’d say Craft and Bootstrap together are a match made in heaven. Here’s why: 1) Bootstrap is an out-of-the-box template that gives you great flexibility if you want to design your website how you want it to look. I found other frameworks like WordPress ...


4

Technically, all entries have all fields, regardless of their layout. Field layouts are mostly just a UI thing. 1) Is there a way to tell if an field is actually actively assigned to the entry layout? It’s a little cumbersome and would require the MN Break and Continue plugin, but yes: {% for flf in entry.getFieldLayout().getFields() %} {% set field ...


4

While both lightswitches and checkboxes represent an on/off state, they are quite different. Standard browser behavior is designed to only post checkbox data if the checkbox is checked, otherwise it is ignored. In PHP, when processing the form, you would want to check whether the post-data is present or not; if it's present then the value is checked; ...


4

You can simply add it inline to your body tag like so: <body style="background-image: url({{ myGlobal.myAssetsField.first().url }})"> If you want to only use it with selected templates, you'd better use Craft's includeCss tag: {% set bodyCss %} .myBodyClass { background-image: url({{ myGlobal.myAssetsField.first().url }}); } {% ...


4

When I use my email field to attempt an email address change, I get a verification email generated by Craft sent to the new email address, but the email change is not reflected in either the CP or on the front-end when I refresh the form. The user's email address won't actually update until you click the link in the verification email the user receives.


4

As you've discovered, your Matrix Field behaves a bit differently than many other basic fields. The Matrix Field, is composed of several Matrix Blocks and, like Entries themselves, Matrix Blocks are Element Types. So, you can access your value on a MatrixBlockModel in the familiar way that you know how to do already on your EntryModel, however, first you ...


4

You can use "incognito mode" in your browser, or you use another browser or computer for this type of front end testing.


4

Craft is completely "BYO HTML", so there is no magic in making Foundation work with Craft, unlike lesser CMSes that force their own HTML on you. Just add your stylesheet links and script tags to your main base HTML wrapper and have fun building!


4

Not possible – any input values added to your profile editing form (such as test in your case) will be included in the POST request to the users/saveUser controller action, but they won't actually be included in the redirect request back to the page (or to whatever URL is in your form's hidden redirect input). As a workaround you can always check for the ...


4

I'll focus on the "sending an activation email from the front end" part of your question, since that seems to be the crux of it: You'd have to write a very simple, custom plugin. For instant success, scaffold your plugin using the Plugin Factory. Under Plugin Components, enable Controllers. Unzip and install your plugin. In the Controller class, add ...


4

You can just make link to a twig template to output a csv quite simply...just like any other template really, except it won't extend you layout etc. and will simply contain something like: {%for result in results %} {{var1}},{{var2}},{{var3}} etc... {% endfor %} Depending on what sort of csv you're after and what you're going to do with the data, you ...


4

You're right that your template needs some adjustments. Whenever you're saving an Assets field, you need to have all of the Asset id's not just the new ones. You're looking for something like {% if entry.photos|length %} {% for photo in entry.photos %} <input type="hidden" name="fields[photos][]" value="{{ photo.id }}" /> {% endfor %} ...


4

For that path, Craft would look for the following template files, and use the first one that exists: craft/app/templates/users/_edit craft/app/templates/users/_edit.html craft/app/templates/users/_edit.twig craft/app/templates/users/_edit/index.html craft/app/templates/users/_edit/index.twig craft/plugins/users/templates/_edit craft/plugins/users/templates/...


4

In Craft, you as developer are responsible for everything that is front-end output. So if you want a banner slider, you'll have to add a field on the entry where you can add images, and in your entry's template, write the needed html to display the banner. I'd suggest going trough the documentation to learn about entries, fields,templates, ... Also you ...


4

This was an unintentional breaking change. See https://github.com/craftcms/cms/issues/4693 Update: Fixed in 3.2.9, which is now (2019-08-06) available https://github.com/craftcms/cms/blob/develop/CHANGELOG-v3.md#329---2019-08-06


Only top voted, non community-wiki answers of a minimum length are eligible