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


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

You can use FreeForm module for this purpose.


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

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"); }


3

You don't need to run this through EE at all if you don't want to. Simply create your PHP script outside of EE's templates and have the form post its data there. I did something very similar to what you need recently to send data from a contact form to a CRM system. They supplied a ready made PHP script (which used CURL) to get the data to the CRM. I just ...


3

OK, I found a quick fix / workaround for this. What the Forms Module looks to be doing is checking the IP address of where the form data is coming from, to the IP address that the form thinks it is. system/expressionengine/third_party/forms/act.forms.php And at around line 82 you should see: // Same IP? if ($this->EE->forms->data['...


2

Yes, you need to get a new XID each time via Ajax and update your form hidden value, so next time the form is submitted it uses the new XID. Depends what your Ajax is returning of course and where it's submitting to, but in the past on return from the Ajax submission, I've fired another function to just do an Ajax request, then do the replacements. For ...


2

I think, you need to look into that channel preferences under "Channel Posting Preferences". You can see "Default HTML formatting in channel entries" and set it to "Convert HTML into character entities". I hope, it would work for you.


2

Nothing to do with Freeform or ExpressionEngine, just your CSS. 2 solutions... change <ul class="six columns"> to <ul class="twelve columns"> Or add a new CSS style: form#freeform .columns { float:none; }


2

You could try to solve with Jquery with depend function like so $(".selector").validate({ rules: { contact: { required: true, email: { depends: function(element) { return ($('#theRequiredField').val() == ''; } } } } SOURCE: http://jqueryvalidation.org/validate#...


2

The issue was with my a specific line of code in my upd.database_add.php file. The original line was 'ACT' => ee()->functions->fetch_action_id('Module_name', 'register'), It should be (and currently is corrected to) 'ACT' => ee()->functions->fetch_action_id('Database_add', 'register'), I forgot to put the name of my module as an ...


2

I know it's a bit old but for someone looking to change some parameters (like the return value) on submit by JavaScript - the reason it's not possible is that EE uses the meta tag which is an encrypted string containing some of the information. So, to change the value you would need to recreate that encryption. Look in the file Channel_form_lib.php for more ...


2

Matt, two options for you. 1) Easy: pass a segment variable to the safecracker form, then use 2 if statements (rather than an if else) to set the return values you need. That means youll need two different links pointing to the safecracker form. 2) More work: create an extension and use the safecracker hook - channel_form_submit_entry_end to redirect to ...


2

You can use use a variable in your return url like this: return="/mytmeplategroup/thankyou/%FENTRY_ID%/" And on the thankyou template do something like this: {exp:forms:entries fentry_id="{segment_3}"}


2

OK, I think I got it. By adding the following parameter to the form: inline_error_return="/template-group/template-with-form/errors" Then I can use the following to get what I need: {if segment_3 == "errors"} <p class="error">There were some errors with your submission. Please make the necessary corrections and re-submit.</p> {/if} MY ...


2

The EE1 docs are still available for download. Just look in the top right corner for a link to download the zipped docs. You can look for the section about the email module, which should do exactly as you need. In this case, it may be easiest to just work with what you have. Upgrading to 2.7 from 1.6.8 could be quite an undertaking. Sometimes it works out ...


2

It's a bug in ExpressionEngine 2.7. I've filed a bug report. Will be fixed in the next version. There's some info on how to fix it on the ExpressionEngine bug tracker https://support.ellislab.com/bugs/detail/19733 and on the forum http://ellislab.com/forums/viewthread/237991/#1059052


2

Snaptcha has some additional features over Honeepot to better prevent spam submissions. Snaptcha's "medium" and "high" settings require that javascript be enabled, which blocks spambots (they don't use JS). The "high" setting also only allows the form to be submitted once, which helps prevent multiple spam submissions. I also highly recommend Low Nospam ...


2

You could have a hidden field (create a new text field in the CP and on the front end just use a hidden field in its place so it records) and inject the UA via JS from the onsubmit param of the form: {exp:freeform:form form_name="my_form" form:onsubmit="document.getElementById('ua').value=window.navigator.userAgent;"} <input type="hidden" name="ua" id="...


2

It might be this bug: https://support.ellislab.com/bugs/detail/19782 which affected me, and the fix worked as well: Known Solution: -------------- Try editing system/expressionengine/modules/channel/libraries/Channel_form/Channel_form_lib.php around line 966 so it looks like: if ($this->datepicker) { $js_defaults['ui'][] = 'datepicker'; $...


2

Double check this parameter to make sure the template is named "user-request": recipient_template="user-request" Also, try recoding your select like this: <select name="recipient_email" id="recipient_email"> <option value="{freeform:recipient_value1}">Option</option> <option value="{freeform:recipient_value2}">Option</...


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