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

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

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

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


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

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

I believe a number of add-ons, like Exp:resso's Store, that automate the creation of PDF files, use DOMPDF: an HTML to PDF converter. It can be called directly with PHP for use in ExpressionEngine or you can take a look at Patrick Pohler's PDF Press. I haven't used PDF Press, it's pretty new, but with the exception of the one issue with Unicode Characters, ...


2

It's not covered in the docs, but apparently, according to this forum post, there are language packs for the forms module to allow you to do this, yes. I'd check in with the DevDemon folks to find out which languages are available and how to go about loading the language pack.


2

Assuming you have more than one page to your checkout process, the easiest way to do this is simply to submit a hidden field on the first page of your checkout which checks the register_member field. For example, simply add this to the first page of your checkout form: <input type="hidden" name="register_member" value="1" /> Now, by the time the ...


2

To stop the posting of the forum, you can use jQuery submit: http://api.jquery.com/submit/ The code would look something like this: $(window).ready(function() { $('#mx_locator').submit(function() { if ($('#mx_zip').val() == '' && $('#mx_city').val() == '') { // Additional code here to light up the input or display error ...


2

You can use the Forms JS Validation plugin http://devot-ee.com/add-ons/forms-js-validation You can add basic and complex validation to your forms without modify the form tag itself.


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

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

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


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