Person Form - Date & Time Field

i am trying to create a web Person Form in SuiteCRM 7.8.2

Adding a Datetime field and it is not being included inside the generated form?

Any suggestions

Thanks again

Can you further explain your problem.

Thank you for the reply,

1 - In the lead module I have added a datetime field

2 Campaigns > Create a Person Form

3 - Create a Person Form based on Lead module

4 - Add fields (First Name, email address and the datetime field)

5 - All fields are included inside the generated person form except the datetime field

I am also having this issue just now.

I am unable to display datetime type fields at all even manually inserting into the script.

I done a quick bit of research and apparently type=datetime has been discontinued and is no longer supported by browsers. datetime-local is the new replacement.

Is there somewhere i can edit datetime to datetime-local in the crm files?

If you would like edit date and time in edit view form, you should use type: datetimecombo in vardefs.php.

Thanks for the reply.

Can you give me a little more info on how to do this please?

I would really appreciate it

How do you add field in Studio or edit vardefs-file?

Edit vardefs file.

I know how to add fields in studio

I am currently looking at /modules/Leads/vardefs.php

Is this the right file and what do I change in it?

You can look at file: module/Tasks/vardefs.php and field: date_due .

I added the date_due to the leads module vardefs and renamed date_due to my own custom field. I am able to get the date time field to display in the edit view which is good but I am still unable to get this onto a webform so that I can pass this information into the crm.

The form builder: modules/Campaigns/WebToLeadFormBuilder.php , which create the form, does not support the type: datetimecombo.

  1. You can edit this file and make a special function for this field type. For it you can take html-code from file: include/SugarFields/Fields/Datetimecombo/EditView.tpl
  2. I think that the code in file: modules/Campaigns/WebToPersonCapture.php is saving data correctly.
1 Like

Thanks for trying to help but I’m not very good with this.

I’ve had a look at both files there and can’t work out where to start with it really.

All I need is a date and time field that can be submitted externally and understood by the CRM to populate a date and time in the Leads section. I feel like this should be easier.

I only tested this form builder and showed the way. You should make a lot of custom code. But for my integrating tasks I used standard API and make form without the builder.

I don’t need to use the builder.

I just don’t know how to send data to those date time combo fields from outside of SuiteCRM

Ill post my end goal here incase I’m missing something obvious.

  1. I want to submit a form with a date and time selected for an appointment.
  2. This then lands in the leads section of the crm
  3. Automatically create a calendar entry either as a Call or a Task for the date and time selected.

You should use API. See information:
Old version: service/v4_1/soap.php
New version: Api/docs