Home › Forums › Quform WordPress › Can’t change field value
- This topic has 8 replies, 2 voices, and was last updated 2 years, 1 month ago by marianogi.
- AuthorPosts
- September 25, 2022 at 4:47 pm #34707marianogiParticipant
Hi!
I use the code in this URL (https://support.themecatcher.net/quform-wordpress-v2/guides/customization/modify-form-data-before-it-is-processed) to change the value of the full url stored in my custom database. I don’t want the full URL, I only want the file name to be stored.My code is:
add_filter('quform_pre_process_4', function (array $result) {
if (isset($_POST['quform_4_69'])) {
$arrURL = explode ( "/", $_POST['quform_4_69'] );
$_POST['quform_4_69'] = $arrURL[count($arrURL)-1];
}
return $result;
});
But it never executes because $_POST[‘quform_4_69’] is always unset, which is impossible because that field is always required.
Thank you
September 26, 2022 at 10:02 am #34710AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
September 26, 2022 at 12:14 pm #34711marianogiParticipantHi!, thank you for your fast response and help, as always.
Yes, I am sure 4_69 is the correct ID. And here you can check the form:
https://sercodi.es/empleo-2/
(I send the url like this because the comment cropped the ‘/empleo-2/’ part of the link, I don’t know why.
Let me know if you need credentials to see the backend and my code.
- This reply was modified 2 years, 2 months ago by marianogi. Reason: URL cropped and not working
September 27, 2022 at 10:01 am #34717AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- This reply was modified 2 years, 1 month ago by Ally.
September 27, 2022 at 10:32 am #34719marianogiParticipantGreat!! thank you!, about that, can you tell me where to see all that variable combinations? I mean a documentation page or similar where I can learn all that variables. I think I saw another modifier (I don’t know how to call it) to write a date with another date format. I’d like to see all possibilities of it.
Thank you again!
September 27, 2022 at 11:13 am #34721AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
September 27, 2022 at 11:44 am #34724marianogiParticipantThank you!, this is a very useful information to me!. Hope you can make a documentation page soon.
September 29, 2022 at 10:47 am #34772AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
September 29, 2022 at 1:22 pm #34774marianogiParticipantYou leave me speechless. Believe me, you have the best plugin, support and documentation I ever see, after many years buying dozens of plugins and themes.
Please consider making a multipurpose theme and I’ll be there! 🙂Thank you!!
- AuthorPosts
- You must be logged in to reply to this topic.