FORM_REQUIRED_INPUT - Moving Asterisk

Open to all! Ask other shopowners for help.
Post Reply
Dnj1964
Member
Posts: 54
Joined: Fri Nov 06, 2020 8:27 pm
Phoenix Version:
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.


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
zipurman
Builder
Posts: 540
Joined: Tue Oct 13, 2020 5:20 pm
Phoenix Version: v
Has thanked: 93 times
Been thanked: 162 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
-----------
plamastus
Member
Posts: 82
Joined: Fri Mar 12, 2021 2:09 am
Phoenix Version:
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
Builder
Posts: 540
Joined: Tue Oct 13, 2020 5:20 pm
Phoenix Version: v
Has thanked: 93 times
Been thanked: 162 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
-----------
plamastus
Member
Posts: 82
Joined: Fri Mar 12, 2021 2:09 am
Phoenix Version:
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
Builder
Posts: 540
Joined: Tue Oct 13, 2020 5:20 pm
Phoenix Version: v
Has thanked: 93 times
Been thanked: 162 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
-----------
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 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
Builder
Posts: 540
Joined: Tue Oct 13, 2020 5:20 pm
Phoenix Version: v
Has thanked: 93 times
Been thanked: 162 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
-----------


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply