How to Insert Text into website text-field by Class-name

Hi Coders,

I tried for a couple of hours but was unable to put text on my website text-field, I tried a lot of tutorials provided on this community but no one was able to fulfill my needs, and my last hope was Taifun Guide but I was still unable to achieve my goal.

and my blocks are:

my website login codes are these


 <div class="login-area">
            <div class="login-area-inner">
                <div class="text-center">
                   
                   
                </div>
                <form method="POST" action="{{ route('user.login')}}" onsubmit="return submitUserForm();" class="login-form mt-50">
                    @csrf
                    <div class="form-group">
                        <label>@lang('Username or Email')</label>
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <div class="input-group-text"><i class="las la-user"></i></div>
                            </div>
                            <input type="text" class="form-control" value="{{ old('username') }}" name="username" placeholder="@lang('Username or Email')">
                        </div>
                    </div><!-- form-group end -->
                    <div class="form-group">
                        <label>@lang('Password')</label>
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <div class="input-group-text"><i class="las la-key"></i></div>
                            </div>
                            <input type="password" class="form-control" name="password" placeholder="@lang('Password')">
                        </div>
                    </div><!-- form-group end -->

                    <div class="d-flex justify-content-center mb-3">
                        @php echo loadReCaptcha() @endphp
                    </div>

                    @include($activeTemplate.'partials.custom_captcha')

                    <div class="mt-5">
                        <button type="submit" class="cmn-btn rounded-0 w-100">@lang('Login Now')</button>
                        <div class="mt-20 d-flex flex-wrap justify-content-between">
                      
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </section>
    <!-- account section end -->

also when i inspected element and enter text in a website Text field it looks like this

aia file:
inject(1).aia (2.7 KB)

Thanks in advance

it is called getElementsByClassName (see the s after Element), which needs a class name and an index…
see the Q&A section here App Inventor Tutorials and Examples: Inject | Pura Vida Apps

Taifun

1 Like

thanks so much you helped me a lot, after adding index it works like a charm