Aw indeed it looks like our doc is broken. I will look into it asap. Meanwhile you can check out this starter plugin for creating custom fields: https://gist.github.com/julien731/a247c8927e2a5c8adf5e
Hi,
in which folder the file “awesome-support-custom-fields” should be inserted?
You just need to drop it at the root of your plugins directory (should be wp-content/plugins).
I followed the link you posted. Am I correct that the fields have to be built within that php file and are not created in the back end of the plugin? If so then how is that done?
Obviously I don’t code.
Hi Julien,
sorry but I can not add a custom field.
For testing, I tried to add
wpas_add_custom_field (‘my_field_with_options’, array (‘title’ => ‘My Options’, ‘options’ => array (‘option1’ => ‘First Option’, ‘option2’ => ‘Second Option’)));
in the file “awesome-support-custom-fields.php” located in / wp-content / plugins / directory, but do not create any field on the form.
the full code of the file that I used can be found here http://pastebin.com/RddaY5mU
Where I was wrong?
Thanks for your patience
Please read the documentation carefully. You forgot the field_type argument when declaring your custom field. I believe what you want is select.
for example So i tried:
wpas_add_custom_field( ‘il_tuo_numero’, array( ‘title’ => __( ‘Il tuo Numero’, ‘wpas’ ), ‘field_type’ => ‘number’ ) );
it’s correct?
Probably something wrong, I can not add this additional field. I added that string but nothing happens.
Julien, could you give me a couple of real world examples? For instance, what would a text field look like? What would a checkbox field look like if the possible selections were 1, 2, and 3? What would a wysiwyg field look like?