Hot answers tagged

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 ...


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']); ...


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

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

You can do this with jQuery. The channels will all need to use the same field group. When you add the channel parameter channel="" to your exp:safecracker tag, the tag renders that in the template as a hidden field with that channel's id number as the value. For example: <input type="hidden" name="channel_id" value="7" /> You can change this ...


3

For really complex forms, I use SafeCracker. It covers most of your requirements. Users can go "back" to previous steps, as the entry is created as result of step 1, user can return to editing anytime they want. Snaptcha (and other anti-spam techniques) are supported, of course. For form validation, I'm using jQuery validation (built-in validation ...


3

The guys at Focuslab have you covered with this article: http://focuslabllc.com/blog/form-building-add-ons-in-expressionengine Lays out the major differences between the different form add-ons.


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 ...


3

The only way to prevent forms which use EE's form hashing security is to disable secure forms altogether. Some modules have a setting to disable it per-form, but it appears that Freeform does not. Most often this error comes up when people use their "back" button and the page is loaded from the cache, not reloaded from the server.


3

You're on the right track. To clarify the _params hidden field, it is just an encrypted record of any parameters you used in the tag. It's not used much in the add to cart form, but for example in the checkout tag, if you specify required fields we need to encrypt these, otherwise the customer could simply edit the hidden field and make them not required. ...


3

You should see here http://www.sidd3.com/stand-alone-member-registration-form-in-expressionengine/ This weblog having the example code for stand alone member registration form without using any third-party add-on.


3

The BW Required Category addon will do the trick to makes categories required for specified channels.


3

You can do it by using the {custom_fields} loop of SafeCraker. In case, you wouldn't like to show some specific custom fields, don't populate them using if condition. Like: {custom_fields} {if field_name != "not_show_field_1" AND field_name != "not_show_field_2"} [Custom field options] {/if} {/custom_fields} Take a reference from http://ellislab.com/...


3

So, I've found a way to achieve this, which seems to work in the reduced test case that I created (Grid fieldtype with one column of text type and only one entry being entered in at a time). In the future, I'll create test that's a bit more complex and see if it becomes more involved. The code for this is: <input type="hidden" name="field_id_9[...


3

You'd have to have them fill out that field themselves. Currently, you have it hidden with display:none. Also, your input related to the Email Address label has a placeholder of "contact number." Try adding a logged_in conditional around the display:none inline style. <p> <label for="email">Email Address</label><br /> ...


3

You just need to ask user to entered his email. <p> <input {if logged_in}type="hidden" value="{member_email}"{/if} {if logged_out} type="text" value=""{/if} id="from" name="from" /> </p> or you can replace FROM email for quest with your own (in all case you have email field) <p> <input type="hidden" id="from" ...


3

Create a hidden template that is just the logged in username only. Then load it in via jquery ajax .load(); Once login is complete as well. if (event.success) { member_favourites = "5"; //do something $("div#username").load("_username.html"); }


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