Home Forums Feature Requests Auto-creation of sample PHP


Auto-creation of sample PHP

  • It would be nice if when you are on the Edit Field Group page, below the fields you have created there is a snippet of PHP. This PHP is a sample of how to use your fields you’ve created above. The PHP is dynamic, that is, as you add a new field, the PHP updates to accommodate that new field.

    You can then copy the PHP to use in your WordPress templates as a starting point- which would speed up development.

    It wouldn’t speed up field groups with one or two fields, but definitely would where there are more. Especially when there are more complex fields like repeater fields with many sub-fields or nested repeaters.

    I know that everyone uses fields in their PHP in different ways, but do think it would be helpful as starting point nonetheless.

  • Hi @joesmalley

    Though it is a great idea, I believe it will break the workflow on the field group editor page. It also can be more of an obstruction than a helper, especially for the experienced users and for the end-users. That’s why most programs provide a documentation somewhere else, not in the program itself.

    I think it will be great if it is packaged as an add-on, so you can deactivate it when you don’t need it. Maybe you or somebody else want to create it?


Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Auto-creation of sample PHP’ is closed to new replies.