Howto add validation in listview in sugarcrm7? - sugarcrm

I need to add validation for field:Phone to prevent adding text into phone field in SugarCRM 7.5
is it possible?
Thanks

You can achieve this functionality by different solutions:
Include JQuery Mask plugin and apply validation on all phone type fields.
Create custom field type for phone and apply validation.
Sugar has provided field validation for record view you can also get help from it link.
Here is related link to your question

Thanks Saad,
I did it by following solution:
Create a new custom field
Add my own mask input into _render() and initialize function
I added keypress event into custom field controller to prevent press invalid characters (symbols,....)
I added mustache files to showing proper values in edit,list view,...

Related

is there a possibility to create an editable checkbox column?

I'm looking for a way to show a boolean value as a clickable checkbox in the table.
In my current example, I have a value called "charged". Currently this is shown as a check. It would be great to have it as a checkbox in order to update the value really quick, instead of clicking on edit on the specific row and update it there.
Example screenshot
Would appreciate any recommendations.
Thanks
The Backpack team has something in the works for this - a package they call "editable columns". But it will probably be launched in Feb-March 2022.
Until then, you can
(A) create a custom column type that will make an AJAX call. For the javascript, take a look at the delete button for inspiration.
(B) Send an email to hello#backpackforlaravel.com for beta access to that package (includes editable_checkbox, editable_switch and editable_text column types right now.

How to add auto complete to a text form field?

I tried using https://pub.dartlang.org/packages/autocomplete_textfield but can't use it in a text form field.
If possible, I would also like to add focus to this field when needed.
I used flutter_typeahead plugin and it gives all the options as in a text form field including autofocus.
Check this plugin :
enter link description here
you can even customize it by checking the source code

wicket - two submit buttons with different validation

I am using two AjaxButton for the same grid where both of them are not in the form but attached to it.
activateButton = new AjaxButton(ACTIVATE_BUTTON, grid.getForm())
blockButton = new AjaxButton(BLOCK_BUTTON, grid.getForm())
my problem is trying to give each one of them different validation, when the form is submitted i am getting all the buttons validation instead of getting just one of them as I want.
For each of the buttons you can disable the default form processing using AjaxButton.setDefaultFormProcessing() and handle the validation directly in the button by overriding AjaxButton.onSubmit().
I would turn off default form processing and control validation manually.
See wicket manual

Want to display an auto generated id in a custom module of SugarCRM

I am using Sugar Enterprise 6.4.0 and want to display a uneditable field in a custom module Edit and Detail view. This id need to be generated automatcially and need to be displayed in the interface when user click to create a new record in the custom module.
Because i am new to Sugar can anyone help me out in performing this task. Any ideas?
You can set the readonly property on the field itself in the vardefs for the module...
$dictionary['<<module>>']['fields']['<<fieldname>>']['readonly'] = true;
Then, add some logic in the custom/modules/<>/views/view.edit.php which does the autogeneration for you.
I just did this, using an after_save_hook with code like(not exact):
$bean->name = $bean->id;
as soon as you save a record in sugar an id is generated automatically. Then I don't include the ID in the editview at all, just the detail and list views. I don't see any point in including it in the edit view as it is not editable.

JIRA - Step description in transition screen

I want to display a text field with the description of the transition, not only input fields. Where can i configure it?
Regards!
João.
You might use the JIRA Toolkit plugin to create a message custom field which are used "to add arbitrary HTML to edit and view pages"
https://plugins.atlassian.com/plugin/details/5142
Given that it supports velocity, it should be possible to retrieve the description of the transition from the context ...
AbstractWorkflowTransition.getDescription()