SIERRA Posted February 8 Share Posted February 8 Hi, We are capturing the following using repeater items using process wire admin interface for sending Event related instant SMS Venue Time Event name Once 'Submit' button is clicked we are replacing the above in our SMS template and are sending. Before that we would like to validate the character count of SMS content. We would like validate the character count of Venue+time+Event name. How can we do this using JavaScript. How can we insert custom .js file in ProcessWire admin side. How can we refer these repeater fields. Please help Thanks Link to comment Share on other sites More sharing options...
netcarver Posted February 8 Share Posted February 8 @SIERRA How are you processing the admin page submission in order to populate your SMS template and send it? Presumably you are using hooks, right? Take a look at AdminCustomFiles for inserting custom JS into admin pages. Link to comment Share on other sites More sharing options...
da² Posted February 8 Share Posted February 8 Why using JS and not a saveReady hook? And maybe a hook on ProcessPageEdit::processInput(form:InputFieldWrapper) to check that fields content is valid and mark them as "error" in the form. You can also manage errors in saveReady by displaying an error Notice to user. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now