Home Forums General Issues Update after changing checkbox value


Update after changing checkbox value

  • Running a quite big AFC setup and are doing all changes from functions. I have setup a checkbox option and are using ‘echo implode’ to show values.

    I needed to change some of the values and i wounder if there is a way to run this change over all posts affected without needing to go in and update them one by one.

    This is the code, And what i changed was adding rel=tooltip. Is there a way to update it all at once ?

    array (
    				'key' => 'field_52a24e45970ec',
    				'label' => 'Mini badges',
    				'name' => 'badges',
    				'type' => 'checkbox',
    				'instructions' => 'Select mini badges',
    				'required' => 1,
    				'choices' => array (
    					'<span rel="tooltip" title="Jackpot" class="btn-danger mini-badges">J</span>' => 'Jackpot games',
    					'<span rel="tooltip" title="Mobile" class="btn-primary mini-badges">M</span>' => 'Mobile casino',
    					'<span rel="tooltip" title="Freespins" class="btn-success mini-badges">F</span>' => 'Free spins on signup',
    					'<span rel="tooltip" title="V.I.P" class="btn-warning mini-badges">V</span>' => 'VIP rewards',
    					'<span rel="tooltip" title="Exlusive" class="btn-exclusive mini-badges">E</span>' => 'Exlusive Bonuses',
    					'<span rel="tooltip" title="Loyalty" class="btn-loyalty mini-badges">L</span>' => 'Loyalty program',
    					'<span rel="tooltip" title="Reload bonus" class="btn-reload mini-badges">R</span>' => 'Reload Bonus',
    				'default_value' => '',
    				'layout' => 'vertical',
  • Hi @mindgames

    I would jump into your PHPmyAdmin (server database) and run some SQL on the wp_postmeta table.

    You can do a find and replace for the old value to the new value. Please backup your DB before running any manual SQL.

    Somehting like this should work:

    UPDATE <code>wp_postmeta</code> SET meta_value='<span rel="tooltip" title="Jackpot" class="btn-danger mini-badges">J</span>' WHERE meta_value='<span title="Jackpot" class="btn-danger mini-badges">J</span>'

    Hope that helps.


  • @elliot Thanks, I had this option in mind but wanna check with you first if there was any other option to it.

    Thanks !

    Keep up the great work, you are creating something really good that more and more people will keep discover!

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

The topic ‘Update after changing checkbox value’ is closed to new replies.