custom-field-type

Symfony Choice type with disabled options

大憨熊 提交于 2020-01-03 08:46:06
问题 Is there any way with Symfony to render a <select> form type with disabled options, based on the truthyness of the given choices options ? I saw this thread (thanks to DonCallisto) about disabling choice expanded options ; However I do not want to have an expanded choice. I would like to keep a select element, with disabled options . $builder->add('list', 'choice', array( 'choices' => array( array( 'value' => 1, 'label' => '1', 'disabled' => false ), array( 'value' => 2, 'label' => '2',

How would you recommend adding an image as a custom field in WordPress?

你离开我真会死。 提交于 2019-12-19 04:55:07
问题 I need to add an image to each page in WordPress. I don't wish to insert it using the WYSIWYG editor, I just need the url as a custom field, which I later use in the template. I tried using the CFI plugin (Custom Field Images), and I hacked my way into getting it to work with the rest of my plugins, but then I moved the site to the production server and CFI just didn't work for some reason. I can't seem to find any other plugin that just lets you pick an image from the library and add it as a