Since there's no standard in Drupal for using or not <?php...?> on text areas designed to input PHP code, these fields usually includes a note on their description telling if the <?php...?> are (not) needed.

Since the module allows for PHP input in a text area, it would be good if you explain in the field description if the <?php...?> tags are needed or not.

Comments

mautumn’s picture

For those, like me, who had trouble finding it...

Its explained at the bottom of the Automatic title generation collapsible group ( at the top of Content Types add/edit form) - under the checkbox Evaluate PHP in pattern.

E.G. to store a pseudo-random UUID as the Title (as per RFC 4122 and courtesy of mimec - http://www.php.net/manual/en/function.uniqid.php#69164) :-

<?php
printf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
        mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
        mt_rand( 0, 0x0fff ) | 0x4000,
        mt_rand( 0, 0x3fff ) | 0x8000,
        mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );
}
?>

Thanks for this module.

flaviovs’s picture

@michael38walker, thanks for the tip, but this page is specific to tracking the issue at the top of the page, and I fail to see how your tip is related to it.

Please, create a handbook entry under http://drupal.org/node/283830 so that other can refer to your tip when necessary.

Thanks again.

fago’s picture

Status: Active » Fixed

I think it should be fine as it is.

flaviovs’s picture

Status: Fixed » Closed (won't fix)

Fixing status then (please see http://drupal.org/node/156119)