Limit user to input email to just first part (can enter just name up to # sign) - email

I have form inside popup windows in which i enter user details for specific company (first/last name, password/confirm pass... etc.) I want to limit email input field to just enter first part of email format. In other words, i want user to input his name or anything else, and other part after # will be generated according to selected company from dropdown list.
Lets say that user can enter in x spaces xxxx#company.com
If anyone have sugestion for best way to do that, i will be very thankful. For information, i'm working with angular2

If talking about UI design, I think the best solution is to let the user to select the company name first and use an input control similar to Bootstrap Input Groups.
You'll need to change the domain according to your selection.

Related

Significance of entering both title and name while creating a form

While creating a new form,do we need to enter both title and name for the form?may i know why it is mandatory to enter both or what is the difference between Form title and name?
One more thing i noticed is like i can enter same title for multiple forms and is not unique.
The way it was explained to me, and how I have used them, is that the Title is the name of the form, how it is identified to yourself and others. The Name is the roll that it plays. So you might title the form MyDataForm1, but if the form is for the process of payroll analysis, it's name would be PayRollAnalysis1.
I hope I did not misunderstand the nature of the question, but that is how I interpret the answer.

Validation rule for Google Form input to avoid duplicate values in different input fields?

I'm using a Google Form to let parents register their students in our after-school club. As we're 100% virtual (thanks, COVID-19!), parents must first sign up on a 3rd-part activity site, then create sub-accounts for their kids.
My Google form asks them to enter their parent username first, then later enter their kid's username on a second section of the form.
Despite the form instructions using a BOLD CAPS directive to enter their parent ID first, then their child's ID later, I have numerous respondents entering the same ID in both places.
Is there any way to use a validation rule to prevent them from doing this, i.e. (INPUT B) must not equal (INPUT A)?

Change Company Field Label to something else

Using Magento 2.3 Community
At checkout when adding a new address, I need to rename the Company Field Label to something else, how can I achieve that? Also this field appears under my account, edit shipping address. How can I change that label as well? I dont care how it is stored in the database, I just want the label to change.
This should be easy to do :
Step 1 : login to admin dashbroad
Step 2 : go to Stores-> Attributes-> Customer Address.
Step 3 : you will see all fields in the forms there. Click on the field you want to change, you will be editing page then you can change the label to what you want.
Cheers.
If you're looking for a quick and easy solution, you can do it via Theme Translation, this will change the text per your store locale.
For your currently active theme:
Create file:
app\design\frontend\VENDOR\THEME_NAME\i18n\en_US.csv
(change filename based on your locale, en_US is default)
Example:
"Company","Something else"
Note: this will also change the label in the customer account area when creating a new address from there.
https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/translations/xlate.html

Acumatica / Myob Advanced: add an email field

On Myob Advanced (Acumatica), we would like to add a salespersons email address to the Salespersons page (AR205000). This is so that we can then add this field to the Sales Order email template, allowing us to CC the salesperson in every time their customer places an order.
Ive tried to implement this extra field, "Salespersons Email Address"; but I am having some issues.
It will only allow me to save 25 characters within the text box? How come I'm unable to add more than 25 characters?
Email fields that come with the software all have the code of px:PXMailEdit. However, i cant seem to be able to create a MailEdit field, only a px:PXTextEdit field? Why is this?
Thanks for your help. If this doesnt make sense or you need further info LMK.
Currently, Layout Editor does not support PXMailEdit control. Please find below the steps to add a custom email field on the Salespersons screen:
For the SalesPerson DAC, ceate a new field of the string type with length set to 255 (this is the length defined in the PXDBEmailAttribute used on all email fields in Acumatica/MYOB Advanced):
Replace generated attributes with the attributes below, save your changes and publish customization:
[PXDBEmail]
[PXUIField(DisplayName="Email Address")]
Open the Salespersons screen in Layout Editor and add TextEdit control for the custom field declared on step 1, then save your changes:
Select Edit Project Items from the File menu and change control type from PX.Web.UI.PXTextEdit to PX.Web.UI.PXMailEdit in the XML changeset generated for the Salespersons screen, save your changes and publish customization one more time:
This is how custom email field should look like on the Salespersons screen after you complete the steps above:
Using Salesperson's email in Automation Notifications:
If you set up custom Email Address field from the Salespersons screen as CC address in Sales Order notification:
the system will automatically include Email Address from the Default Salesperson in notification message:
Using Salesperson's email in Notification Templates:
This might seem a litle confusing, but the Sales Person node available for selection on the Notification Templates screen represents an Employee linked with a Salesperson (see screenshot below for details):
With SalesOrderNotification's CC field set to ((SalesPerson.SalesPersonID.UsrEmailAddress)), the system should automatically include Email Address from the Default Salesperson in the generated email:

Hide image field completely in drupal 7 module

I'm trying to setup a form where some fields needs to be hidden depending on the user role. I'm doing this in my own module using hook_form_FORM_ID_alter. No problem with common text, email or link fields (e.g. $form['field_companyname']['und'][0]['value']['#type']='hidden'). But for an image field or a multiple value file field the usual way won't work.
Anybody can give me a clue?
I think your going about this the wrong way. Since your limitation is based on roles you can just use the permissions system. Check out field permissions module.
I recommend you to use #access for the element instead of just hiding the field.
For field company name it will go like this:
$form['field_companyname']['#access'] = FALSE;