multipart form field like email address

Hi,

Just downloaded this to use separately to a finished solution we’ve already got implemented with ExtendedPhone
I’m looking at the code and wondering which bits to remove, so that the phone call type is removed, as well as the radio button, checkbox, and the words Main & Don’t call.
I need to put some code in also so that the Max Length is 8 Characters, but I can think I can do that bit.

Many Thanks
Mitchell

This is to madhatt30

Thank you. This works, but the list of phones that you are going to call say “Title: Manager” inside the contact’s field, prompting me misleadingly to only enter the title.

So I am going to call and say, “Hello Manager. I am calling to ask if you are ready to make the purchase of our $50,000 service package?” Come on. Think through it. You need the name of the person and the title.Ideally that field could remain as it is, but without the misplaced prompt. It should say “Contact” or “Contact name/title”. I will try to change it.

Forum mistainkly does not refer to the post I hit reply from… This was to madhatt30
PLEASE FIX THIS!

The last one you uploaded loads, but when adding a field it does not save, just says error.

1 Like

I think you can change this in DropDown lists in Studio. You can at least for Standard Relate fields, not sure about being able to do the same on this custom module.

can you please share the plugin. I intend to add fields which contain multiple entries, specially text (not only phone number)

Hi buddy, can you please share with us the updated plugin. I need dynamic text field (like the phone field you shared), so that I can enter multiple values in a field

But the MultiTextField takes only type phone numbers

Hii, did you find any way to do it.

I also need to collect and save multiple urls via such single field.

Thanks,

Hey Madhat, this is a great idea and not sure why this hasn’t become part of the core Suite/Sugar implementations, especially the Extended Text field, congrats and thanks for all the work you’ve done on this. I’m having a problem with the installation of this module? Running Suite 7.9.9, PHP 7.0 on a Bitnami stack. The package installs fine, however when I attempt to create a Dynamic Phones type field I am returned an error on save. Looking through my logs it appears there is an SQL problem:

Cannot create column Query Failed: ALTER TABLE accounts_cstm add COLUMN phone_nums_c dynamicphonefield NULL : MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘dynamicphonefield NULL’ at line 1

Further entries in my log and back trace are as follows:

Wed Jul 11 11:14:14 2018 [17177][b727f34d-f5e6-2364-d4de-5876c6f655ae][DEBUG] Hook called: ::server_round_trip
Wed Jul 11 11:14:14 2018 [17177][b727f34d-f5e6-2364-d4de-5876c6f655ae][DEBUG] Calling MySQLi::disconnect()
Wed Jul 11 11:14:14 2018 [17177][b727f34d-f5e6-2364-d4de-5876c6f655ae][FATAL] Exception handling in /mysuiteinstall/include/MVC/Controller/SugarController.php:402
Wed Jul 11 11:14:14 2018 [17177][b727f34d-f5e6-2364-d4de-5876c6f655ae][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.
Wed Jul 11 11:14:14 2018 [17177][b727f34d-f5e6-2364-d4de-5876c6f655ae][FATAL] backtrace:
#0 /mysuiteinstall/include/database/DBManager.php(353): sugar_die(‘Database failur…’)
#1 /mysuiteinstall/include/database/DBManager.php(328): DBManager->registerError(‘Cannot create c…’, ‘Cannot create c…’, true)
#2 /mysuiteinstall/include/database/MysqliManager.php(160): DBManager->checkError(‘Cannot create c…’, true)
#3 /mysuiteinstall/modules/DynamicFields/DynamicField.php(657): MysqliManager->query(‘ALTER TABLE acc…’, true, ‘Cannot create c…’)
#4 /mysuiteinstall/modules/DynamicFields/templates/Fields/TemplateField.php(566): DynamicField->addFieldObject(Object(TemplateText))
#5 /mysuiteinstall/modules/ModuleBuilder/controller.php(430): TemplateField->save(Object(DynamicField))
#6 /mysuiteinstall/include/MVC/Controller/SugarController.php(523): ModuleBuilderController->action_SaveField()
#7 /mysuiteinstall/include/MVC/Controller/SugarController.php(491): SugarController->do_action()
#8 /mysuiteinstall/include/MVC/Controller/SugarController.php(465): SugarController->handle_action()
#9 /mysuiteinstall/modules/ModuleBuilder/controller.php(108): SugarController->process()
#10 /mysuiteinstall/include/MVC/Controller/SugarController.php(373): ModuleBuilderController->process()
#11 /mysuiteinstall/include/MVC/SugarApplication.php(105): SugarController->execute()
#12 /mysuiteinstall/index.php(52): SugarApplication->execute()
#13 {main}

ANY light you can shine on what might be the cause would be greatly appreciated, thank you for your time and patience

Sorry, appear to be 2 different streams for this - I posted on the other as well…, I have the same problem as recraig, can’t save a new Extended Phones type field. SQL error. Other post from https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/3716-multipart-form-field-like-email-address?start=30#69138

Hey Madhat, this is a great idea and not sure why this hasn’t become part of the core Suite/Sugar implementations, especially the Extended Text field, congrats and thanks for all the work you’ve done on this. I’m having a problem with the installation of this module? Running Suite 7.9.9, PHP 7.0 on a Bitnami stack. The package installs fine, however when I attempt to create a Dynamic Phones type field I am returned an error on save. Looking through my logs it appears there is an SQL problem:

Cannot create column Query Failed: ALTER TABLE accounts_cstm add COLUMN phone_nums_c dynamicphonefield NULL : MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘dynamicphonefield NULL’ at line 1

Further entries in my log and back trace are as follows:

Wed Jul 11 11:14:14 2018 [17177][b727f34d-f5e6-2364-d4de-5876c6f655ae][DEBUG] Hook called: ::server_round_trip
Wed Jul 11 11:14:14 2018 [17177][b727f34d-f5e6-2364-d4de-5876c6f655ae][DEBUG] Calling MySQLi::disconnect()
Wed Jul 11 11:14:14 2018 [17177][b727f34d-f5e6-2364-d4de-5876c6f655ae][FATAL] Exception handling in /mysuiteinstall/include/MVC/Controller/SugarController.php:402
Wed Jul 11 11:14:14 2018 [17177][b727f34d-f5e6-2364-d4de-5876c6f655ae][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.
Wed Jul 11 11:14:14 2018 [17177][b727f34d-f5e6-2364-d4de-5876c6f655ae][FATAL] backtrace:
#0 /mysuiteinstall/include/database/DBManager.php(353): sugar_die(‘Database failur…’)
#1 /mysuiteinstall/include/database/DBManager.php(328): DBManager->registerError(‘Cannot create c…’, ‘Cannot create c…’, true)
#2 /mysuiteinstall/include/database/MysqliManager.php(160): DBManager->checkError(‘Cannot create c…’, true)
#3 /mysuiteinstall/modules/DynamicFields/DynamicField.php(657): MysqliManager->query(‘ALTER TABLE acc…’, true, ‘Cannot create c…’)
#4 /mysuiteinstall/modules/DynamicFields/templates/Fields/TemplateField.php(566): DynamicField->addFieldObject(Object(TemplateText))
#5 /mysuiteinstall/modules/ModuleBuilder/controller.php(430): TemplateField->save(Object(DynamicField))
#6 /mysuiteinstall/include/MVC/Controller/SugarController.php(523): ModuleBuilderController->action_SaveField()
#7 /mysuiteinstall/include/MVC/Controller/SugarController.php(491): SugarController->do_action()
#8 /mysuiteinstall/include/MVC/Controller/SugarController.php(465): SugarController->handle_action()
#9 /mysuiteinstall/modules/ModuleBuilder/controller.php(108): SugarController->process()
#10 /mysuiteinstall/include/MVC/Controller/SugarController.php(373): ModuleBuilderController->process()
#11 /mysuiteinstall/include/MVC/SugarApplication.php(105): SugarController->execute()
#12 /mysuiteinstall/index.php(52): SugarApplication->execute()
#13 {main}

ANY light you can shine on what might be the cause would be greatly appreciated, thank you for your time and patience

Hey MadHat the MultiTextFields.zip file appears to be the MultiPhoneField file… same drop down and interface in Studio. Any chance you can upload the MultiTextFields file? Would be greatly appreciated, real solid add on functionality for Suite

Thanks for your time and patience

Not sure if anyone else is still looking at this functionality. I’ve done a bit of work on what was provided by MadHat (thanks much for that) - added images so that you can see the differences… different layout and dropped/changed some of the attributes, I’m currently using it for storing multiple business names…

The downside with the field/module as it stands is that the drop down values it uses are hard coded. I’m trying to create a drop down selection box (in Studio) in the multitextfield.tpl file. As you can see in the image attached (studio.png) the drop down box is present however it is NOT pre-loaded with selectable drop down list values. There is also a bit of code missing that assigns the selected drop down list to the field.

I have looked EVERYWHERE that I can think of to find code that will show me what is missing, javascript that loads the dropdown? onchange javascript? etc but can’t find anything to help. If ANYONE has any pointers to the required code, it would be greatly appreciated. Code I located to load the drop down (enum.tpl) is below

Thanks for your time and patience


<tr>
	<td class='mbLBL'>{sugar_translate module="DynamicFields" label="LBL_DROP_DOWN_LIST"}:</td>
	<td>
	{if $hideLevel < 5 && empty($vardef.function)}
		{html_options name="options" id="options" selected=$selected_dropdown values=$dropdowns output=$dropdowns onChange="ModuleBuilder.dropdownChanged(this.value);"}{if !$uneditable}<br><input type='button' value='{sugar_translate module="DynamicFields" label="LBL_BTN_EDIT"}' class='button' onclick="{literal}if(check_form('popup_form')) { ModuleBuilder.moduleDropDown(this.form.options.value, this.form.options.value); }{/literal}">&nbsp;<input type='button' value='{sugar_translate module="DynamicFields" label="LBL_BTN_ADD"}' class='button' onclick="{literal}if(check_form('popup_form')) { ModuleBuilder.moduleDropDown('', this.form.name.value); }{/literal}">{/if}
	{else}
		<input type='hidden' name='options' value='{$selected_dropdown}'>{$selected_dropdown}
	{/if}
	</td>
</tr>

Studio View


Detail View


Edit View

Hi,

I installed MultiTextFields and have this problem:

It shows the phone numbers twice.
Only happen in detail view, the rest are working fine.
Do you have some idea of what is going on?

Thank you.

Hi,

I solved it.
Just delete this from include/SugarFields/Fields/Multitextfield/DetailView.tpl:

{$item.0}
{$item.1}
{$item.2}
{$item.3}

Should be like this:

{php}
global $current_language; $app_list_strings = return_app_list_strings_language($current_language);
$this->assign(‘APP_LIST’, $app_list_strings[‘phone_type_dom’]);
{/php}

{assign var=texts value="^|^"|explode:{{sugarvar key=‘value’ string=true}}}

{foreach name=outer item=text from=$texts}
{assign var=item value="^,^"|explode:$text}
{if $item.2 == ‘1’}
{$item.0}
{else}
{$item.0}
{/if}
{if $item.1 == ‘1’} ({$APP.LBL_PHONE_MAIN}){/if}
{if $item.2 == ‘1’} ({$APP.LBL_PHONE_DONT_CALL}){/if}
 ({assign var=it value=$item.3}{$APP_LIST.$it})


{/foreach}

Then restart apache2 and run the quick repair and rebuild from suite crm.

Tadaa:

Bye.

hello mpeet,

where do I find the plugin which is displayed in you last picture:
dropdown to choose a Business type and field to enter valuie?

thanks for your help
stephan

Hi
Where do I find a working download link
for the plugin Multi Phone Field?

Thank you.

Take a look into this post:

Hope it helps!

Thanks,

AlxGr

Please see the link listed above

Do you know if this works for version 8?

Or if you know if it can be used for free?