class CommentsController < ApplicationController
before_action :set_post
def new
@comment = @post.comments.build
end
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["field", "status"]
static values = {
key: String,
export interface QueryCodec<T> {
parse: (raw: string | null) => T;
serialize: (value: T) => string | null;
}
export function stringParam(fallback = ""): QueryCodec<string> {
export const TOTAL_STEPS = 3;
export interface WizardData {
email: string;
password: string;
fullName: string;
import { Injectable } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
@Injectable()
export class SignupFormService {
readonly form: FormGroup;
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["wrapper", "template", "anchor"]
add(event) {
import { useForm } from 'react-hook-form'
import { useState } from 'react'
import api from '@/services/api'
interface SignupFormData {
email: string
<?php
namespace App\Http\Requests\Wizard;
use Illuminate\Foundation\Http\FormRequest;
use serde::{Deserialize, Serialize};
#[derive(Debug, Deserialize)]
pub struct SignupRequest {
pub email: String,
pub password: String,
<h1>New Article</h1>
<form action="/articles" method="post">
<div>
<label for="title">Title</label>
<input id="title" type="text" name="article[title]"
from django import forms
from .models import Event
class EventForm(forms.ModelForm):
class Meta:
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["field"]
validateField(event) {