FORM_REQUIRED_INPUT - Moving Asterisk

Ask the community for help and support.
Post Reply
Dnj1964
Posts: 58
Joined: Fri Nov 06, 2020 8:27 pm
Has thanked: 8 times

FORM_REQUIRED_INPUT - Moving Asterisk

Post by Dnj1964 »

asterisk.png
Trying to move the asterisk with CSS tried many variations of code

Code: Select all

.form-control-feedback {right: 30px;!Important}
Any help greatly appreciated.
You do not have the required permissions to view the files attached to this post.
User avatar
zipurman
PhoenixCart Developer
PhoenixCart Developer
Posts: 470
Joined: Tue Oct 13, 2020 5:20 pm
Has thanked: 84 times
Been thanked: 147 times

Re: FORM_REQUIRED_INPUT - Moving Asterisk

Post by zipurman »

You could do:

Code: Select all

input + span .fa-asterisk::before {
    position: relative !important;
    right: -20px;
}
select + span .fa-asterisk::before {
    position: relative !important;
    right: -10px;
}
zipurman
aka Preston Lord
-----------
Happy to help where I can ;)

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
Image
plamastus
VIP Member
VIP Member
Posts: 83
Joined: Fri Mar 12, 2021 2:09 am
Has thanked: 1 time
Been thanked: 2 times

Re: FORM_REQUIRED_INPUT - Moving Asterisk

Post by plamastus »

Where exactly do I add that code?

I added it to the gustavo.css, but made no diference.

Thanks
patrick
User avatar
zipurman
PhoenixCart Developer
PhoenixCart Developer
Posts: 470
Joined: Tue Oct 13, 2020 5:20 pm
Has thanked: 84 times
Been thanked: 147 times

Re: FORM_REQUIRED_INPUT - Moving Asterisk

Post by zipurman »

Into your user.css file. Not sure where in the stack your gustavo.css is being loaded. The style needs to be loaded after fontawesome. You could also try:

Code: Select all

input + span .fa-asterisk::before {
    position: relative !important;
    right: -20px !important;
}
select + span .fa-asterisk::before {
    position: relative !important;
    right: -10px !important;
}
zipurman
aka Preston Lord
-----------
Happy to help where I can ;)

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
Image
plamastus
VIP Member
VIP Member
Posts: 83
Joined: Fri Mar 12, 2021 2:09 am
Has thanked: 1 time
Been thanked: 2 times

Re: FORM_REQUIRED_INPUT - Moving Asterisk

Post by plamastus »

Hi,

Thanks...

It does work, but it seems to me that it's on the way when attributes are long...

Thanks,
patrick
User avatar
zipurman
PhoenixCart Developer
PhoenixCart Developer
Posts: 470
Joined: Tue Oct 13, 2020 5:20 pm
Has thanked: 84 times
Been thanked: 147 times

Re: FORM_REQUIRED_INPUT - Moving Asterisk

Post by zipurman »

The asterisk is being placed at the end of the field using font awesome and css. It cannot detect the length of the content. You could either remove it, or you could change the logic for it to append after the field. Anything is possible ... just depends on what is needed.
zipurman
aka Preston Lord
-----------
Happy to help where I can ;)

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
Image
heatherbell
VIP Member
VIP Member
Posts: 1996
Joined: Mon Oct 07, 2019 4:39 am
Has thanked: 26 times
Been thanked: 175 times

Re: FORM_REQUIRED_INPUT - Moving Asterisk

Post by heatherbell »

plamastus wrote: Thu May 06, 2021 6:54 pm it seems to me that it's on the way when attributes are long...
Yes, if 'Add Helper Text' and 'Enforce Selection' are set to 'True' in module, I don't think the asterisk is helpful to anyone so in that case we remove it.
E.g in cm_pi_options_attributes.php, change line 31 to

Code: Select all

$fr_input    = '';
User avatar
zipurman
PhoenixCart Developer
PhoenixCart Developer
Posts: 470
Joined: Tue Oct 13, 2020 5:20 pm
Has thanked: 84 times
Been thanked: 147 times

Re: FORM_REQUIRED_INPUT - Moving Asterisk

Post by zipurman »

Or you could add the following css to your user.css

Code: Select all

input + span .fa-asterisk::before {
    content: '' !important;
}
select + span .fa-asterisk::before {
    content: '' !important;
}
zipurman
aka Preston Lord
-----------
Happy to help where I can ;)

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
Image
Post Reply