Differences between saved and unsaved versions of Create Person Form #4837

Open
opened 2026-02-20 16:24:46 -05:00 by deekerman · 0 comments
Owner

Originally created by @kgaillot on GitHub (Aug 5, 2022).

Issue

After creating a newsletter Campaign (with appropriate Target Lists and Email Template), I try to create a web-to-target form using Create Person Form.

The initial screen shows PHP code to add to my website, and it also has a save button. I'm not entirely sure of the purpose of the save button since it doesn't seem to actually be retrievable later. But the resulting page also has the PHP code to add to the website, however it is slightly different.

I'm not sure why it's different or which version is the correct one to use.

Expected Behavior

The "Create Person Form" generated PHP should be identical whether it is saved or not.

Actual Behavior

Here are the differences for the particular form I generated:

  • The saved version includes the html element, e.g.

    <html lang='en_us'><head></head>
Originally created by @kgaillot on GitHub (Aug 5, 2022). #### Issue After creating a newsletter Campaign (with appropriate Target Lists and Email Template), I try to create a web-to-target form using Create Person Form. The initial screen shows PHP code to add to my website, and it also has a save button. I'm not entirely sure of the purpose of the save button since it doesn't seem to actually be retrievable later. But the resulting page also has the PHP code to add to the website, however it is slightly different. I'm not sure why it's different or which version is the correct one to use. #### Expected Behavior The "Create Person Form" generated PHP should be identical whether it is saved or not. #### Actual Behavior Here are the differences for the particular form I generated: * The saved version includes the html element, e.g. <html lang='en_us'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><style type="text/css"> whereas the unsaved version only included the style tag: <style type="text/css"> This is not a problem, since the saved version is obviously intended to be used as a standalone web page while the unsaved version can be inserted into an existing web page. But it is unexpected; a cleaner user experience might be to show the style element only, with an explanation that it is meant to be inserted into an existing web page. * The saved version has a lot of extra blank lines (not a problem, just an unexpected difference) * The unsaved version has an extra commented-out script element inside a comment marked "TODO ???"; the saved version has the TODO but not the script element. Also not a problem, but the entire comment should be left out, or the element should be uncommented if appropriate. * The saved version has this for the submit button: <input type="submit" class="button" name="Submit" value="Confirm" /> while the unsaved version has: <input type="submit" onclick="submit_form();" class="button" name="Submit" value="Confirm" /> I would guess the unsaved version is more correct, but I'm not sure. * The unsaved version correctly has a script element surrounding some JavaScript functions at the bottom, while the saved version leaves them bare (which of course does not work if added to a web page and just shows them as plaintext). #### Possible Fix Suggestions above (though I'm not sure about the submit button) #### Steps to Reproduce 1. Create a campaign. 2. Select Create Person Form. 3. Copy the resulting PHP into a file. 4. Save the form. 5. Copy the PHP on the resulting page into a different file. 6. Compare the files. #### Context I don't believe this is causing problems, but I'm not sure, and having them identical would avoid second-guessing. #### Your Environment * SuiteCRM Version used: 8.1.2 * Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Firefox 91.11.0esr * Environment name and version (e.g. MySQL, PHP 7): * MariaDB 10.5.16 * PHP 8.0.21 (from remi repo, so IMAP support is built in) * Apache HTTP Server 2.4.54 * PHP-FPM 8.0.22 * Operating System and version (e.g Ubuntu 16.04): Fedora 35
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4837
No description provided.