Hot answers tagged

35

I would recommend using either snaptcha or honeepot as they are both unobtrusive captchas that the end user never sees. They are also very very effective.


14

There's also Low NoSpam, which you use in conjunction with an Akismet license. I started using it on my personal site when CAPTCHAs weren't effective and it reduced spammy submissions to zero. The other advantage to Akismet is you don't need user-unfriendly CAPTCHAs. Even honeypots can be outsmarted by bots on occasion, and they're not effective against ...


14

It seems that for whatever reason my 2.5.3 was permitting these forms to function even though "Process form data in Secure Mode?" was set to YES. After the upgrade to 2.7 this restriction began to be enforced on my admin forms as well. The solution comes in two parts: Add a hidden input field to carry the XID token Find and use a suitable value to assign ...


8

I like Sean's suggestions, but if you are avoiding CAPTCHA simply because they can be difficult to enter in for a user, check out Accessible CAPTCHA to see if it will suit your needs. You can set up a series of questions that will be picked at random instead, that a user has to answer. I've used it on sites and have had some fun having the questions be "on ...


7

In addition to CAPTCHA, you might want to take a look at VZ Bad Behavior - it will block known spammers from the entire site. Give it a look; I've used it and had great success with it.


7

Actually, the current version doesn't allow OR modifiers to the search. I think this would be a good feature request, and I can definitely work into the release after next. (v3.2) In theory, the markup would be: <input type="hidden" name="status[]" value="pending" /> <input type="hidden" name="status[]" value="open" /> But currently (as of 3.0....


7

The default functionality using the channel preferences is not very informative for users. Clients almost always complained when I used it. I highly suggest you checkout Postmaster. https://objectivehtml.com/postmaster There quite a few add-ons to add additional email functionality to EE but none come close to the robust feature set of Postmaster. You can ...


7

You will get that error if you have secure forms enabled, and you submit a form without including a valid XID in the post. More here: http://ellislab.com/blog/entry/putting-the-secure-in-secure-mode-forms Add this to your form: <input type="hidden" name="XID" value="{XID_HASH}"> You can disable secure forms in your config, although this is not ...


6

This is a known bug in ExpressionEngine 2.5.3, see BugTracker. You need to be logged in to view. The fix requires adjusting some code in the SafeCracker modules file. See below… Open system/expressionengine/modules/safecracker/libraries/api/Api_sc_channel_entries.php and find this code on line 66: $checkbox_fields = explode('|', $data['checkbox_fields']); ...


6

Are you sure that ajax="yes" is required? I believe freeform autodetects that (for graceful degradation on the client). I haven't checked the FreeForm source but I suspect it could be that you're actually accidentally triggering ajax="no" with that param.


6

I've used DevDemon's Forms and Solspace's Freeform Pro and they both seem to store the actual form in their own database tables so I'm not sure how you could use SafeCracker with such a set up. Freeform Pro is what I'd use for a multipart form now, as it has a pretty slick and clean interface (although I have a wish list for this addon) - that said I'd ...


5

This will definitely require a module. I recommend taking a look into the developer documentation to get a feel for this. I wouldn't write any code to do what you want without a plugin or module. It's not too difficult to get started. http://ellislab.com/expressionengine/user-guide/development/index.html You can use Pkg.io to make your life easier. This ...


5

The only way to allow members to register without an add-on is to use the Member module's registration functionality. This page is displayed based on your "member" trigger word, uses a completely different set of templates from the rest of your site, and is generally a pain in the ass. (This is why modules like FreeMember and User are so popular.)


5

Check out the very useful Category Field addon. From the Devot:ee description: "This field type allows you [to] organize your category groups as you would any other custom field type anywhere on your publish entries form." You could create one "Category Field" field for each of your 3 category groups and make these fields required in the channel field ...


5

First, no need to ever load directly from CI - you can always use EE. (So, $this->EE->load->helper('file').) Same with your validation class - I'd extend Form_validation, not CI_Form_validation. (Generally, EE should serve as your path to anything CI-related to avoid any conflicts.) You'll need to load your custom validation library, and call it ...


5

Yes, if you replace {composer:field_output} with {freeform:field:{composer:field_name} attr:placeholder="Your Name"} in the Composer Template. If you're using the Freeform channel custom field (i.e. using the field in {exp:channel:entries}), you'll have to select your custom Composer Template (containing the above code) in the top left dropdown of the ...


4

... when the form fields are filled out correctly ExpressionEngine itself throws an "x Field Required" error message("Email Field Required" for the Comment Form ... The comment form code that you've posted includes a from field, not an email field. It seems pretty likely that EE is looking for $_POST['email'] and then bailing when it can't find it. The ...


4

Give your entries an status of 'pending' once they are submitted. Then in your template, only show the form is the status isn't 'pending'. I haven't tried this using any third party form addons but since you can do this with Safecracker, I'd assume it's possible with a more full-featured form add-on.


4

It would be difficult to lay out the full code here, but we do something similar, so let me try to point you in the right direction. What you are looking for is normally referred to as "jQuery Autocomplete". A great example can be found here: http://www.ramirezcobos.com/labs/autocomplete-for-jquery-js/ Or use jQuery along with jQuery UI with this: http://...


4

Since you fixed the redirect issue, I thought I would tell you how I handle the redirect stuff. On restricted templates I will add the following tag. The tag will vary based on the size of the page URL. I like this approach because it avoid Cookies and local session vars, which are restricted in some parts of the world. {if logged_out}{redirect="/login/...


4

This was patched in 2.5.4, according to the changelog.


4

Your example code shows you doing two things: Listing any existing comments on the entry ({exp:comment:entries}) Displaying a list of Channel Entries ({exp:channel:entries}) Nowhere are you displaying the comment form (even though you linked to the documentation on it). However, the comment form is generally meant to be used on a "single entry" template, ...


4

According to the docs the ENTRY_ID constant still exists and is what Rob is referring to in his reply: http://ellislab.com/expressionengine/user-guide/modules/safecracker/index.html#return Not positive though, one thing you may need to watch out for is required custom fields on the EE (and Safecraker) side of things. You could implement something on the ...


4

"When updating username, screen_name or password inside the update form providing the current password is always required except for super-admins and the parameter does not have to be specified." Source: http://ee-zoo.com/docs/visitor/tags/update.html Even though the user may not explicitly be updating their username, for example, since the field appears in ...


4

This is far from obvious how to achieve in EE, and it's not really documented at all. A long while ago I wrote up on Stack Overflow how we (used to) do this in Store, and this was in turn based on how SafeCracker (now Channel Form) did it. However, I've since figured out an even cleaner way to achieve it (Channel Form, FreeMember, and many other add-ons use ...


4

You can use FreeForm module for this purpose.


4

You can avoid the XID validation by making a GET request instead of a POST request. XID validation only occurs when secure_forms is y and the $_POST array is not empty. Or you can generate a valid XID hash by using {XID_HASH} in your template. Maybe something like: <body data-xid="{XID_HASH}"> <script> $.post( 'site/inifinite_scroll_ajax', ...


4

1.) Ensure your server time is set correctly and check your ExpressionEngine server timezone setting. Both the form hash ID and the session ID are time sensitive. If ExpressionEngine is calculating when to expire them based on an incorrect time, your hash ID may expire much sooner than it should. 2.) Quickest way to test whether it’s due to Secure Mode is to ...


3

This functionality isn't built in, but you could utilize the ENTRY_ID constant inside the return="templategroup/template/ENTRY_ID" parameter to point to an intermediate template to do a dynamic redirect. Then, within that template, you can use a Channel Entries tag like to load the new entry, where you could have a conditional to do redirects. Something ...


3

I think this question is a little vague, you need to clarify what exactly you are trying to do. I'd also question whether EE makes a good backend for any sort of mobile app, you are probably better off writing your own backend app directly in PHP, or looking at something like Parse, however, I digress. The principles are simple enough. This has already been ...


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