-
-
Save techjewel/97fd2eb24d8895a8a4e27bbeb90ec89a to your computer and use it in GitHub Desktop.
<?php | |
// Inject Link Form Settings Menu | |
add_filter('fluentform_form_settings_menu', function ($items) { | |
$items['my_menu_slug'] = [ | |
'title' => 'My Menu Title', | |
'slug' => 'my_settings_slug' | |
]; | |
return $items; | |
}); | |
// Your settings callback here | |
add_action('fluentform_form_settings_container_my_settings_slug', function ($formId) { | |
$form = fluentFormApi('forms')->find($formId); | |
$formProperties = fluentFormApi('forms')->form($form); | |
// Form Inputs | |
$inputs = $formProperties->inputs(); | |
$inputLabels = $formProperties->labels(); | |
dd([$form, $inputs, $inputLabels]); | |
}); | |
/* | |
* Helper functions for form meta for storing and getting the settings | |
*/ | |
// \FluentForm\App\Helpers\Helper::setFormMeta($formId, 'YOUR_META_KEY', 'YOURMETA VALUE'); | |
// \FluentForm\App\Helpers\Helper::getFormMeta($formId, 'YOUR_META_KEY'); | |
Hey @techjewel
We have tried to add the input fields with the help of your action but it has been added at the top of every field. We need to allow them in between the other fields as we are creating the custom addon for Fluent Forms.
Is this you can help me out?
Hello There,
As I said, You have to use fluentform_form_settings_container_my_settings_slug
action so you will get a brand new VIEW in the form the settings. Based on that you can actually output your own feed html and settings.
This is the optimal method that you can fully do whatever you want.
Regards
Hey @techjewel,
Yes, But we need multiple feed options as you have in addons, that are already completed and working well. We just need to add the show/hide text field whenever a dropdown has been selected. We don't have any selector (ID/Class) for a dropdown that we can take and show/hide our text field.
Does this make sense?
Hi @helloarpitgshah
in the
fluentform_form_settings_container_my_settings_slug
you can load your own scripts and HTML or whatever you want and make the settings and UI. If you load any custom js please make sure keep thefluentform
in the file name.