moto.hi
Forum Replies Created
-
I’m looking for the same thing
Forum: Plugins
In reply to: [Download Manager] 3.2.66 Upgrade brakes server file viewHi,
Do you have an update on when the fix will be in pace and available to download?
Forum: Plugins
In reply to: [Download Manager] Upgrade to Version 3.2.62 breaks shortcodesMy bad. I had to pull the browser window open more. you can close this.
Thanks aakash8! that did the trick
Yes. All roles are set to auto approve. There isn’t an email confirmation or admin confirmation.
- This reply was modified 3 years, 10 months ago by moto.hi.
Looks like the error i was getting was on me when i copy/pasted your code. fixed that and went through a test registration but got redirected nowhere I just stayed on the registration form not logged in but my account was created.
Thanks!
I get the following error though on line 4
Don't Panic The code snippet you are trying to save produced a fatal error on line 4: syntax error, unexpected '&' The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before. Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.my form id is : 13519
maybe this will help someone else who needs a similar solution.
/**
* Validate TTT Code
* @param string $key
* @param attay $array
* @param array $args
*/
function um_custom_validate_ttt_code( $key, $array, $args ) {
if ( ! function_exists( ‘post_exists’ ) ) {
require_once( ABSPATH . ‘wp-admin/includes/post.php’ );
}
if(!post_exists($args[$key],”,”,’ttt_code’)) {
UM()->form()->add_error( $key, __( ‘Please enter a valid Train the Teachers code’,”,”,’ttt_code’), ‘ultimate-member’ );
}
}
add_action( ‘um_custom_field_validation_ttt_code’, ‘um_custom_validate_ttt_code’, 30, 3 );`
`- This reply was modified 3 years, 10 months ago by moto.hi.
I redirect them to the login page which then redirects to the previous page they were attempting to access. The login page has the optional button to register.
I also have a login and register button at the top of every page.
- This reply was modified 3 years, 10 months ago by moto.hi.
I got it sorted out
Thanks for your reply. That method seems like the best option for non programmers.
I created a custom post type using the Pods plugin and I’ve added a few of the codes.
I’m not really a programmer and have no idea how I would update one of the examples in your docs to search the post type titles to validate.
Any help would be appreciated.
Thanks!
I’m trying to figure out the best way to create a custom validation callback function for the list of codes i have that doesn’t require the code to be case dependent.
It’s not clear to me how to do this in the following doc https://docs.ultimatemember.com/article/94-apply-custom-validation-to-a-field
The list of codes will grow and they are alphanumeric values with underscores and hyphens. Here’s a few more: ua-1234,TTT_2020, Global2020. I have about 20 now.
I haven’t created a custom validation callback function yet. Not sure of the best way to do so.
Yes – It’s similar to an invite code. Given out at events. So the list would grow in time.