Questions tagged [hash]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 views

Redirect url validation failure

I'm stuck on something and need some advice. I have a frontend login form where I need to dynamically change the redirect input value with JS when it changes. The page has instantsearch in place and I ...
justinholtweb's user avatar
1 vote
1 answer
199 views

DOM hash url in entry slug

I try to set the slug of an entry to a url using a hash. https://url.spec.whatwg.org/#dom-url-hash However it seems not possible by default, craftcms changes the hash to a dash. I need that as ...
Honsa Stunna's user avatar
1 vote
1 answer
91 views

Setting numerical key values in a hash

I now know the answer to this but I’m posting it here as a note to myself and in case it helps people. Let's say you are looping through some entries and storing values in a hash… {% set myHash = {} %}...
Jonathan Schofield's user avatar
1 vote
2 answers
207 views

Using a variable for a hash key

I am trying to use a lookup table technique I saw in a recent Craft Link List post, but getting errors. The general objective is to auto-generate button text from an array of possibilities using a ...
Roi Agneta's user avatar
  • 1,463
1 vote
1 answer
235 views

Get a hash’s key name

This is possibly more of a Twig thing, but if I have a hash… {% set hash = { "key": "value" } %} How can I output the key name? {% for value in hash %} <span class="{{ key }}">{{ ...
Jonathan Schofield's user avatar
1 vote
1 answer
25 views

Problem with data hash only storing last entry in loop

1: I'm creating a data hash object and then looping through a collection of entries to store the results of various macros in it: {% set data = {} %} {% set people = craft.entries().section('people')...
Jonathan Schofield's user avatar
2 votes
1 answer
2k views

Getting "Invalid verification code." on password reset

I've had a few users on our site have trouble resetting their password. They go through our "Forget password" flow on the front-end of our site, receive the reset email, which allows them to create a ...
Travis Gertz's user avatar
1 vote
1 answer
699 views

How does "hash" work in the context of the Contact Form?

I'm running into some trouble using the "hash" filter in Craft's first-party Contact Form plugin. The docs suggest using it like so: <input type="hidden" name="redirect" value="{{ 'contact/thanks?...
Roger Wilco's user avatar
1 vote
2 answers
202 views

Importing members from EE without password reset

We've rewritten an EE site on Craft and now need to import the members. My understanding is that since passwords are hashed & not encrypted there is no way to transfer the passwords from EE to ...
celeste.nexus's user avatar
3 votes
2 answers
1k views

Encrypt ID on front-end and decrypt on back-end

I have a front-end form that posts through the ID of a particular element/entry to a back-end controller. Is there any way to encrypt/hash that ID on the front-end, so the plain ID number is not ...
Tim Everts's user avatar
4 votes
3 answers
987 views

How can I import existing users with passwords stored in a different format than Craft's hash format?

Se need to import a large user table to a Craft installation. Unfortunately, the passwords in the imported data are SHA1 encrypted (and salted). What is the best way to enable the login of the users? ...
user3826's user avatar
3 votes
2 answers
7k views

Craft or Twig filter for MD5 or SHA3 hash creation?

I've been digging around and haven't found an existing Twig filter for what I'm trying to do. Basically, I'd like a filter that would provide a hash of a phrase. Pseudo-template code would be ...
John Morton's user avatar
2 votes
1 answer
2k views

How can I convert a dropdown field value to an integer within a hash?

I'm setting up a twitter feed with craft.twitter.get() and I need to convert a dropdown value to an integer. Here is my code far: {% set cacheTime = sidebarBlock.twitterFeedCacheTime %} {% set tweets ...
Steve Adams's user avatar
  • 1,671
7 votes
1 answer
774 views

How can I use operators within Twig hashes?

I'm looking for documentation on how to use operators in hashes in Twig. Someone mentioned this in the Google+ support group the other day and I was unable to find any docs or examples. {% set ...
Steve Adams's user avatar
  • 1,671