Categories
Mastering Development

How can send readonly value from a form?

<form action=”/upload” method=”POST” enctype=”multipart/form-data”> <fieldset> <span>Event name</span> <input name = “name” type=”text” class=”form-control” value=”<%= `${event.name}` %>” readonly> </fieldset> <fieldset> <button type=”submit” id=”form-submit” class=”btn”>Add Event</button> </fieldset> </form> and then i’m doing req.body.name and getting undefined… How do i resolve it? app.post(“/upload”, (req, res) => { console.log(req.body.name); });

Categories
Development

how to Get selected option value within PHP page reload

<div class=”form-group row”> <label for=”event_name” class=”col-sm-2 col-md-1 col-form-label”>Event Name</label> <div class=”col-sm-4 col-md-4″> <select class=”form-control event” name=’event_name’ id=’event_name’> <option value=”Option_1″>Option 1</option> <option value=”Option_2″>Option 2</option> <option value=”Option_3″>Option 3</option> <option value=”Option_4″>Option 4</option> <option value=”Option_5″>Option 5</option> </select> </div> </div> <h4>{Event name}</h4> my question is how to get {Event name} when i select any option?

Categories
Development

How do I send slack notification using lambda (python) of sns alert

I get sns event in json object to my emails but I want specific part to be sent to slack notification using lambda. I want time, event name, group id, event id etc to be parsed and send to slack. I tried various example online but keep getting error. I have a cloudwatch event which […]