Take the 2-minute tour ×
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It's 100% free, no registration required.

I have a site in which I'd like to achieve the following:

  1. Provide a publicly accessible but obfuscated and hard to guess at URL to which a customer can be referred to, to submit some data via a Channel Form without them having to register and log in (the data they submit is personal to them but does not personally identify them).
  2. Upon submission the entry is automatically closed so the form cannot be used again.

So what I'd ideally like is a way to auto-generate unique URL Titles that are intrinsically hard to guess at. Something like…

mydomain.com/segment/hyr6gDEGhyus

I guess I could achieve this with custom JavaScript in the CP but anyone got any other suggestions?

share|improve this question

2 Answers 2

You can do this with last version (2.8.8) of MX Title Control. You can add {random_string} tag into URL Title Pattern and get 10 characters random string.

Hidden Configuration Variables

$config['mx_random_string_length'] = "20";
$config['mx_random_string_pattern'] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
share|improve this answer
    
Thanks, Max. That sounds exactly like what I need. Will give that a go. Assuming I can get that working, do you have a PayPal donation pot I can tip some money in to? –  Jonathan Schofield Feb 21 at 17:36

Sure - create an extension using the entry_submission_start hook and set your unique url_title there:

ee()->load->helper('string);
ee()->api_channel_entries->meta['url_title'] = random_string('alnum', 16);
share|improve this answer
    
Thanks, Derek. Max's answer below sounds more like my territory though. –  Jonathan Schofield Feb 21 at 17:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.